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 HCL Workload Automation for Z variables:
VARSUB SCAN(!)
MODIFY CPOC ADID(!OADID.) IA(!OYMD1.!OHHMM.)
MODIFY CPOP OPNO(!OOPNO) DESC('NO DATA TODAY')
This also means that HCL Workload Automation for Z information becomes available to jobs tracked by HCL Workload Automation for Z that were not necessarily submitted by HCL Workload Automation for Z.
For more detailed information about variables, see Variable naming convention.