BUG: Can't Redirect File as Input When Running a Program in PWB (69220)
The information in this article applies to:
- Microsoft Programmer's Workbench for MS-DOS 1.0
- Microsoft Programmer's Workbench for MS-DOS 1.1
- Microsoft Programmer's Workbench for OS/2 1.0
- Microsoft Programmer's Workbench for OS/2 1.1
This article was previously published under Q69220 SYMPTOMS
The Microsoft Programmer's WorkBench (PWB) contains three ways to run
a program:
- You can choose Execute from the Run menu (and choose Command Line
from the Run menu to specify the command-line arguments).
- You can choose Run DOS Command from the Run menu.
- You can use the key combination "Arg textarg SHIFT+F9".
However, a problem occurs if a file is redirected as input into a
program that is executed using any of the methods above. The length of
the input file, from which STDIN will receive data, will be erased and
will receive a length of zero bytes. Thus, you cannot run a program
(command) from the Programmer's WorkBench that expects STDIN to be
redirected from a file. For example, if the command "PROG <INPUT.TXT"
is entered under Run DOS Command from the Run menu, the file INPUT.TXT
will be erased and have a length of zero. This problem occurs only in
DOS. The OS/2 version of the Programmer's WorkBench works correctly.
RESOLUTION
One way to work around the problem is to create a batch file that
performs the command. Rather than running the program directly, the
program can be ran in the batch file with STDIN redirected from a
file.
STATUS
Microsoft has confirmed this to be a problem in the Programmer's
WorkBench version 1.1. We are researching this problem and will post
new information here as it becomes available.
Modification Type: | Major | Last Reviewed: | 10/23/2003 |
---|
Keywords: | kb16bitonly KB69220 kbAudDeveloper |
---|
|