Specifying OCL instructions
To correctly specify
OCL instructions in your JCL, observe the
following rules:
- When you specify two or more REXX instructions
on the same line,
separate one from the next by a semicolon followed immediately by
one or more blank characters (; ). For example:
IF VAR1 = 'OK' THEN ADD APPL(TEST01); ELSE GOTO ESCI - Specify all the instructions in column 1 through column 72.
- If
the instruction continues on the next line, end the first line
with a comma (the continuation character). For example:
IF RESULT > 0 THEN, DEL APPL(TESTAPPL2) IF SUBSTR(VAR2,3,1) = '0' THEN COMPL APPL(TEST03);, ELSE ADD APPL(TEST04) - If you continue a list
of keyword values on the next line, end
the first line with two consecutive commas (,,). For example:
CHKAPPL APPL(TEST01,TEST02,TEST03,TEST04,, TEST05) - If you need to use IBM Z Workload Scheduler-managed
variables, specify
the JCL tailoring directive (for example, //*%OPC SCAN). These variables
will be substituted by the scheduler before it runs the OCL program.
For example:
In this example, the scheduler substitutes &OYMD1 with the occurrence input arrival date in YYMMDD format.//… JOB … //*%OPC SCAN //… //EQQOCL.SYSIN DD * if substr(&OYMD1,5,2) = 31 then goto lastdd ⋮ - Prefix
a comment line with an asterisk (*). For example:
//EQQOCL.SYSIN DD * * This is my comment line ⋮ - The following instructions store their return code in the variable RESULT:
ADD ADDOP ADDPRED ADDRES ADDRES CALL CHGEXTNAME CHKAPPL CHKDTE COMPL CHGJOB CHGOPSAI COMPL DEL DELSIMP DELPRED DELRES FORCE HOLD MODCOND JSUACT KILLJOB KILLREC MODOP RELSUCC NOP OPSTAT RELEASE RELOP RELSUCC SRSTAT UNNOP WSSTAT For example:CHKAPPL APPL(test01,test02) IF RESULT = 0 then … - Do not include delimiters, such as parentheses, in descriptive fields, such as DESC and EXTNAME.