|
VADELIA |
SADELIA |
WADELIA |
MADELIA |
|
(I/B) (C/S) |
(B) (S) |
(I/B) (C/S) |
(I) (C/S) |
Section for use
All
Syntax
EXECUTE_CMD Command ExecutionType
Command |
→ |
'AlphaConstant' | AlphaVarId |
ExecutionType |
→ |
*SYN | *ASYN | None |
Description
This instruction executes the 'AlphaConstant' command or a command specified in the alphanumeric variable AlphaVarId.
You can select the manner in which the instruction is executed:
*SYN |
Synchronous |
*ASYN |
Asynchronous |
The default setting is *SYN.
With AS/400 server modules, the execution type is ignored and the command is executed synchronously.
To check whether the command has been executed successfully, you can test the *RETURN_CODE reserved word where the command is executed synchronously.
Example
COMMAND = 'Notepad Myfile.txt'
EXECUTE_CMD Command
COMMAND = 'Notepad Myfile.txt'
EXECUTE_CMD Command *ASYN
* these lines run Notepad editor
Other examples
* assume W_CMD is an alpha variable defined in the program
EXECUTE_CMD W_CMD
*
EXECUTE_CMD W_CMD *SYN
*
* java daemon starts
W_CMD = 'd:\Exploit\java\client\cla\daemon.bat'
EXECUTE_CMD W_CMD *ASYN
EXECUTE_CMD 'd:\Exploit\java\client\cla\daemon.bat'