Using variable substitution

The variable substitution mechanism that is used in HCL Workload Automation for Z native job types works the same way when scheduling jobs on HCL Workload Automation Agents. The variable substitution mechanism changes when you define job types with advanced options, such as Java jobs that run a Java class, or file transfer jobs that transfer files to and from a server, to name a few. These types of jobs are created and edited using the Dynamic Workload Console.

When you define a variable for job types with advanced options, including those defined in a JOBREC using the JOBTYPE keyword, the variable must be preceded by the $ (dollar) sign and enclosed in {} (curly brackets), as follows:
${variable_name}
If you want to nest variables, use the following syntax:
${variable_1_name ${variable_2_name}}
In this case, variable_2 is resolved first and provides the value for variable_1.
With job types with advanced options you also have the option to define and use variables locally on the HCL Workload Automation Agents. To define a variable on the agent, use the param command. After defining the variable, to add it within a job definition so that it is resolved locally on the agent at run time, use the following syntax:
${Agent:variable_name}
User passwords can be similarly parameterized for local resolution. For details, see Defining variables and passwords for local resolution.

Dependent variables and promptable variables are not supported in job types with advanced options.

For more information, see Variable substitution.