In OPS/REXX, instructions provide logic structures (IF ... THEN ... ELSE ..., DO WHILE ... END) and define variables, while host commands allow you to issue actions (TSO commands, ISPEXEC commands, z/OS operator commands, JES commands, and VM/CP commands). In general, when OPS/REXX encounters an instruction consisting solely of an expression (a string by itself is a valid expression), it assumes that the instruction is a host command.
OPS/REXX does not interpret the syntax of host commands. To OPS/REXX, a host command is a meaningless string of characters. For instance, if you make a coding mistake such as placing an OPS/REXX function on a line by itself without a variable and an equal sign, OPS/REXX will probably interpret it as a host command and send it to the environment specified in the last ADDRESS statement. Conversely, instructions have a specific meaning to OPS/REXX.
Examples: OPS/REXX Instructions and Host Commands
OPS/REXX program demonstrating instructions and host commands:
if today = "Friday" then
say "TGIF !!!"
else
do
address OPER "D A,L"
address TSO "LISTBC"
end
In the above example, the strings D A,L and LISTBC are host commands. All other constructs are OPS/REXX instructions. The specific instructions are:
The data structures shown are:
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |