startCmd()

The sysLib.startCmd() system function runs a system command and then continues processing, without waiting for the command to finish. This function is provided for compatibility with the I4GL RUN WITHOUT WAITING statement. You can use this function to start non-EGL programs or scripts.

The system command to be run must be visible to the currently running program. Consider the following example:
sysLib.startCmd("mySpecialProgram.exe");
In this case, the PATH environment variable must point to the directory that holds mySpecialProgram.exe. You can also specify the complete directory location, as in the following example:
sysLib.startCmd("program files/myWork/mySpecialProgram.exe");

Use the sysLib.callCmd() function to run a system command and wait until the command finishes to continue processing.

Both sysLib.callCmd() and sysLib.startCmd() assign the value that the system command returns to the system variable sysVar.returnCode. The system command must return a value that is assignment compatible with the INT type.

Syntax

  sysLib.startCmd(
    command STRING in
    [, mode STRING in] )
command
Identifies the operating-system command or program name to invoke.
mode
This can be a literal or a variable containing one of the following words:
form
Short for formatted, also known as raw mode. Each character of input becomes available to the program as it is typed.
line
No information is sent to the command specified until the Enter key is pressed.

Compatibility

Table 1. Compatibility considerations for startCmd()
Platform Issue
COBOL generation The sysLib.startCmd() function is not supported.
JavaScript generation The sysLib.startCmd() function is not supported.

Feedback