Using the explicit form of the EXEC command
Using the explicit form of the EXEC command involves naming the data set that contains the REXX exec or CLIST. You can create the fully-qualified data set name and determine whether it will run as a REXX exec or a CLIST. You can specify either the CLIST or EXEC operand to denote that the data set be run as a REXX exec or CLIST. If you specify neither operand, the data set is run based on the following specifications or defaults:
If you know that the procedure being run is a CLIST, you can code the CLIST operand. If you know that the procedure being run is a REXX exec, you can code the EXEC operand. If you do not code the CLIST or EXEC operand on the EXEC command, the EXEC command processor examines line 1 of the procedure for the characters "REXX" within a comment. (The characters "REXX" can be in uppercase, lowercase, or mixed-case.) This is known as the REXX exec identifier. If the EXEC command finds the REXX exec identifier, the EXEC command runs the procedure as a REXX exec. Otherwise, it runs the procedure as a CLIST.
In addition to determining if a procedure is run as a REXX exec or a CLIST, the CLIST and EXEC operands of the EXEC command determine how to name a non-fully-qualified data set. If you specify EXEC, a non-fully-qualified data set name is suffixed with the "exec" qualifier. If you specify CLIST, or if you omit either EXEC or CLIST, a non-fully-qualified name is suffixed with the qualifier "clist".
- A REXX exec
- A CLIST
Data Set is fully qualified | |
---|---|
If you specify: | The procedure runs as a: |
EXEC | REXX exec |
CLIST | CLIST |
Neither and REXX ID is present | REXX exec |
Neither and REXX ID is not present | CLIST |
Data set name is not fully qualified | ||
---|---|---|
If you specify: | Then TSO/E adds: | The procedure runs as a: |
EXEC | TSO/E prefix and EXEC suffix | REXX exec |
CLIST | TSO/E prefix and CLIST suffix | CLIST |
Neither | TSO/E prefix and CLIST suffix and the REXX ID is present | REXX exec |
Neither | TSO/E prefix and CLIST suffix and the REXX ID not present | CLIST |
The following examples use the explicit form of the EXEC command and show how the procedure runs in each case.