Variable substitution

IBM® Z Workload Scheduler supports automatic substitution of variables during job setup and at job submit. IBM® Z Workload Scheduler 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 IBM® Z Workload Scheduler 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.

IBM® Z Workload Scheduler lets you create variables in job statements, in comment statements, and in any in-stream data within the job. You cannot use IBM® Z Workload Scheduler 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 IBM® Z Workload Scheduler 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 IBM® Z Workload Scheduler 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 IBM® Z Workload Scheduler tailoring. If a variable is set to ¬ (logical not) or has this as a default setting, the variable is deleted from the line.