A DOS application can be started in a virtual DOS machine by a user in one of several ways:
Note that an OS/2 application may also start a DOS application by issuing a DosExecPgm() function call. The DOS application can be started as a dependent or independent child process of the OS/2 application.
There are certain limitations to starting DOS programs from an OS/2 V2.0 command prompt. For example, neither output redirection (using the ">" character) nor piping (using the "|" character) works as it would from a DOS command prompt. When starting a DOS application from the OS/2 command prompt, OS/2 Version 2.0 calls the DOS command processor (COMMAND.COM), which then receives the application's name and parameters and starts it. The OS/2 V2.0 command processor does not start the application itself but transfers all control to the DOS COMMAND.COM. When we use redirection or piping from the OS/2 command prompt, it is only effective for the OS/2 session. Since OS/2 starts COMMAND.COM, and not the DOS application itself, OS/2 will only redirect the output of COMMAND.COM, not the application.
Thus with a DOS program XYZ, neither:
XYZ > DUMMY.FIL
nor:
XYZ | more
would work from the OS/2 command prompt the way it does from a DOS command prompt.
One solution to the above limitation is to put the redirection or piping statement into a DOS batch file and call the batch file instead.