The sysLib.callCmd() system function runs a system command and waits until the command finishes before resuming processing. This function provides compatibility with the I4GL RUN statement. You can use this function to start non-EGL programs or scripts.
sysLib.callCmd("mySpecialProgram.exe")
The
program "mySpecialProgram.exe" must be in a directory
that the environment variable PATH points to. You can also specify
the complete directory location, as in the following example:sysLib.callCmd("program files/myWork/mySpecialProgram.exe")
Use the sysLib.startCmd() function to initiate a system command and continue processing without waiting.
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.
sysLib.callCmd(
command STRING in
[, mode STRING in] )
| Platform | Issue |
|---|---|
| COBOL generation | The sysLib.callCmd() function is supported on iSeries®, but not supported on zSeries or VSE |
| JavaScript generation | The sysLib.callCmd() function is not supported |