Where variables can be used

IBM Z Workload Scheduler variables can be used anywhere in your job and as many times as you want. Variables used in comment and in-stream data will also be substituted.

Substitution takes place depending on the setting of the VARSUB initialization statement. If VARSUB(YES) is specified, variable scanning is performed for all operations. If VARSUB(SCAN) is specified, IBM Z Workload Scheduler searches for variables only if the //*%OPC SCAN directive has been encountered in the job.

IBM Z Workload Scheduler does not substitute variables within procedures, with the exception of inline procedures when VARPROC(YES) has been specified in the OPCOPTS statement. However, variables are substituted in the calling EXEC statement. See Variable substitution in z/OS JCL procedures.