PreviousNextIndex

DOS statement

(Windows only)

Runs a program, DOS command, or DOS batch file, or starts the DOS command processor, which allows interactive processing of DOS commands.

Syntax

DOS [ SILENT ] [ command-token | VALUE ( expression ) ] ... 

SILENT
command-token | VALUE ( expression )
Example

On UNIX, this procedure runs the UNIX ls command. In Windows, this procedure runs the DOS dir command. On other platforms, the AVM displays a message stating that the operating system is unsupported.

r-dos.p
IF OPSYS = "UNIX" THEN UNIX ls. 
ELSE IF OPSYS = "WIN32" THEN DOS dir. 
ELSE DISPLAY OPSYS "is an unsupported operating system". 

Note

If you use the DOS statement in a procedure and the procedure compiles on a UNIX system, the procedure runs, as long as flow of control does not pass through the DOS statement while running on UNIX. Use the OPSYS function to return the name of the operating system where a procedure is being run. This function lets you write applications that are portable among OpenEdge-supported operating systems even if they use the DOS, UNIX, etc. statements.

See also

{ } Preprocessor name reference, OPSYS function, UNIX statement


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex