DATE – Workload Automation Programming Language internal date
When using the equal sign (=) to represent a DATE or TIME within Workload Automation Programming Language, by default the date and time when Workload Automation Programming Language started is used.
Workload Automation Programming Language maintains a static internal date to enable you to generate multiple statements with a current date that is consistent across the statements, regardless of whether the date changes during running.
OPTIONS DATE
enables you to set a specific
current DATE
to use instead of the equal sign
(=) or any other function that requires the current date within Workload Automation Programming Language.
The format of the date can either be ccyymmdd or yymmdd. If yymmdd is used, the century is calculated by using HCL Workload Automation for Z HIGHDATE and CWBASE settings.
OPTIONS DATE(070124) TIME(1600)
INSERT CPOC ADID(MYAPPL1) IA(=)
INSERT CPOC ADID(MYAPPL2) IA(=)
INSERT CPOC ADID(MYAPPL3) IA(=)
INSERT CPOC ADID(MYAPPL4) IA(=)
INSERT CPOC ADID(MYAPPL5) IA(=)
INSERT CPOC ADID(MYAPPL6) IA(=)
You can also use OPTIONS DATE
to set the
internal Workload Automation Programming Language date
to be relative to the current date.
For example:
OPTIONS DATE(+1)
sets the date that Workload Automation Programming Language will
use as current to tomorrowʼs date.
OPTIONS DATE(-1)
sets the date Workload Automation Programming Language will
use as current to yesterdayʼs date.
You can reset the internal Workload Automation Programming Language date
and time to the current date and time by using OPTIONS
DATE(RESET)
.