Variable substitution

HCL Workload Automation for Z supports automatic substitution of variables during job setup and at job submit. HCL Workload Automation for Z also supplies several standard variables, which you can use in your job. You can create your own variables using the OPC JCL VARIABLE TABLES panel; these variables are stored in variable tables in the HCL Workload Automation for Z database. By using the same variable name in different variable tables and associating the tables with different applications, you can make the value the variable takes dependent on the application that it is being used in.

HCL Workload Automation for Z lets you create variables in job statements, in comment statements, and in any in-stream data within the job. You cannot use HCL Workload Automation for Z variables within cataloged or in-stream procedures. Variables occurring in comments are substituted (including comments to the right of job statements). When you create a variable using the JCL VARIABLE DEFINITION panel, you specify whether HCL Workload Automation for Z should substitute it at job setup, at job (or started task) submission, or both.

You can specify that the variable values be supplied in any of these ways:
  • Manually
  • By a user-written exit
  • Automatically from information in the HCL Workload Automation for Z database

A variable that must be supplied by the operator is called a promptable variable.

The same variables can be used by several applications. The default value of a variable is stored in a variable table. If you have the same variable in different variable tables, make sure that the correct concatenation is in effect when substitution occurs. The order of concatenation can change the value assigned to the variable at substitution (see the example). The variable table contains the default value for a variable and the rules for evaluating the variable.

Note: If a variable is given a value of blank, the variable is not substituted if the variable definition states that no value is required. This lets these variables undergo normal operating system substitution after HCL Workload Automation for Z tailoring. If a variable is set to ¬ (logical not) or has this as a default setting, the variable is deleted from the line.