Variable substitution

Workload Automation Programming Language supports variable substitution within its control statements. In this way, the actual values required for each command run are provided (for example, the occurrence name or Input Arrival date).

To activate the variable substitution, use the command VARSUB SCAN. By default, the prefix to identify the variables within the command text is the exclamation mark (!). Optionally, you can use a period (.) to terminate the variable name. Because the exclamation mark can be encoded as different character numbers within some code pages, it is recommended that you use VARSUB SCAN(!) to guarantee the use of the exclamation mark that corresponds to your code page.

For example, Workload Automation Programming Language can update the operation text of the running job to indicate something about the processing that day, without having to code the SYSIN as instream data in the JCL to use IBM® Z Workload Scheduler variables:

VARSUB SCAN(!)
MODIFY CPOC ADID(!OADID.) IA(!OYMD1.!OHHMM.)
MODIFY CPOP OPNO(!OOPNO) DESC('NO DATA TODAY')

This also means that IBM® Z Workload Scheduler information becomes available to jobs tracked by IBM® Z Workload Scheduler that were not necessarily submitted by IBM® Z Workload Scheduler.

For more detailed information about variables, see Variable naming convention.