Temporary variables
- 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 after the occurrence 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 occurrence input arrival date, as in the following example:
Example
//*%OPC SCAN
//*%OPC SETVAR TVAR=(OYMD2+1WD)
If the occurrence input arrival date is 97/02/07 (Friday), and the next working day is Monday 97/02/10, TVAR will be assigned the value 97/02/10. 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.