JCL tailoring directives

HCL Workload Automation for Z can dynamically include or exclude job statements during job setup and job submit. HCL Workload Automation for Z excludes lines in the job by skipping them at job setup or at job submit. You can include the job statements from a member in the EQQJBLIB library or supply them through a user-defined JCL-embed exit.

HCL Workload Automation for Z uses special comment statements, called directives, to manage the inclusion and exclusion of lines and to control aspects of variable substitution. The directives are:
  • NOP
  • SCAN
  • SEARCH
  • SETFORM
  • SETVAR
  • TABLE
  • BEGIN and END
  • FETCH
The general syntax of the directives is:
  • Each directive must begin on a new 80-byte line.
  • All directives begin with //*%OPC in columns 1 to 7 followed by at least one space. The only exception is the NOP directive, for which only one space is allowed.
  • Directive parameters can be coded in any order.
  • Directive parameters can occur more than once in the same directive.
  • Directive parameters are separated by commas with no embedded blanks between parameters on the same line.
  • If more than one parameter value is specified, parentheses are required. For example, this is correct:
    NAME=TABLE1
    But this is incorrect:
    NAME=TABLE1,TABLE2
    It should be defined:
    NAME=(TABLE1,TABLE2)
  • A directive specification cannot exceed 71 characters. It can be continued on a new line if the directive is split by a comma after a complete or partial parameter.
  • Positions 72 to 80 are ignored.
  • Each continuation line must begin with //*%OPC in columns 1 to 7 followed by a least one space.
  • Except for the NOP directive, if the directive is executed successfully, the //*%OPC is changed to //*>OPC.

If a line begins with //*%OPC and none of the known directives is found, the HCL Workload Automation for Z job substitution routines treat any other directives that it finds as “unknown,” and will take no action.

Note:
  1. When a variable has been substituted with a value from the current variable table concatenation, that value remains valid for the entire substitution phase. It will not be changed when a different table is declared by a subsequent SEARCH or TABLE directive (see JCL tailoring directives), even if the same variable name is found later. Therefore avoid using several variable tables for the same job, especially if they contain variables with the same name.
  2. If you set VARSUB(SCAN) in the OPCOPTS statement, the SCAN directive must be present in the JCL, in order to process all the subsequent directives.
Table 1. Date formats allowed in the SETVAR directive
ODMY1 ODMY2 OYMD OYMD1 OYMD2 OYMD3
OLYMD OLMD CDDMMYY CYMD CYYMMDD OCDATE
OCFRSTW OCFRSTWY OCFRSTC OCLASTW OCLASTWY OCLASTC
CDATE OPIADATE OPLSDATE
Table 2. Day-in-year formats allowed in the SETVAR directive
ODDD OYYDDD OLYYDDD CDDD CYYDDD
Table 3. Month formats allowed in the SETVAR directive
OMM OMMYY OYM OYYMM CMM CMMYY
CYYMM CYYYYMM OLMM
Table 4. Time formats allowed in the SETVAR directive
OHHMM OLHHMM CHHMM CHHMMSSX CTIME OCTIME
OPIATIME OPLSTIME

The following sections provide you with a description of the directives. If you are unfamiliar with syntax diagrams, see How to read syntax diagrams.