SYSTEM

Executes an arbitrary operating system command.
Restriction: This routine is supported in native COBOL only.

When calling this routine, ensure you are using the 1024 calling convention.

Syntax:

CALL "SYSTEM" USING command-line [repaint-screen] [exit-code]

Parameters:

command-line
PIC X(n)
repaint-screen
PIC X
exit-code
PIC S9(4) BINARY

On Entry:

command-line
An alphanumeric data item that contains the command line to be passed to the operating system. The command is the contents of command-line with trailing white spaces suppressed. The command does not need to be null-terminated.
repaint-screen
This parameter is ignored in this COBOL system.

On Exit:

exit-code
The exit code for the command, returned from the operating system. The value returned is dependent on the underlying operating system. A value of 0, however, indicates success and a non-zero value indicates an error.

Comments:

The implementation of this library routine is identical to the existing Micro Focus version of SYSTEM.

This version of the SYSTEM command is used when the calling convention is 1024. This may be specified explicitly in the CALL, by using the DEFAULTCALLS Compiler directive, or by specifying the DIALECT"RM" Compiler directive.