call
Command:
CALL
Syntax:
CALL <system-command-literal | variable> <system-command-literal | variable>… .
Description:
CALL is used to call a shell command. Essentially, system-command-literal or the contents of variable are executed at the operating system’s command prompt. Multiple arguments may be specified for a CALL command, and group items may be used as CALL arguments.
CALL is an extremely powerful and versatile command, so use caution when implementing a program that uses CALL, especially when that program receives data from web input or other unauthorized user input. It’s generally inadvisable to perform a CALL on any user input value that has not first been validated or examined by your program, since CALL provides access to operating system commands.
Example Usage:
Example with one literal argument:
CALL `dir *.txt`.
Example with one variable argument:
MOVE `ls *.tmp` TO system_command.
CALL system_command.
Example with one literal and one variable argument:
MOVE `*.cbl` TO wildcard_variable.
CALL `ls –l ` wildcard_variable.
Example with gldi variable argument:
1 system_command.
5 `ls`.
5 ` *.tmp`.
CALL system_command.
Sample Program:
CALL.CBL