HCL Workload Automation, Version 9.4

Temporary variables

You can create temporary variables using the SETVAR directive.

You can create temporary variables using one of the following:
  • An arithmetic expression on the date-related or time-related variables.
  • A substring of another variable.
  • The result of an arithmetic addition or subtraction.
  • Concatenated strings or variables set to an alphanumeric value.

For example, you might want to refer to the first workday of the next week after the job stream input arrival date in the format YY/MM/DD. You do this by creating a temporary variable from the supplied variable, OYMD2, using the SETVAR directive. The temporary variable is assigned the value (date) of the first workday after the job stream input arrival date like this:

Example

//*%OPC SCAN
//*%OPC SETVAR TVAR=(OYMD2+1WK)

If the job stream input arrival date is 12/07/20, and the first working day of the following week Monday 12/07/27, TVAR will be assigned the value 12/07/27. You can now refer to TVAR as a normal variable through the rest of the job: you can also give it a new value later in the job.

For details, see SETVAR directive.