Setting dates and times
Some keywords allow you to enter dates, times, or date and times. To use the current date, time, or datetime, you can enter the equal sign (=) as the only content of the keyword.
The following restrictions apply to the use of the equal sign (=) for dates and times:
- It can be used only for fields whose value is specifically
a date, time, or datetime. You cannot use it for any other type of
field,
DESCR(=)
is not a date or time short form,DESCR(=)
will result in the description being set to a single equals sign. - It cannot form a part of the data. For example,
IA(=)
is allowed, whileIA(060124=)
is not allowed. - Do not use the equal sign (=) for field values in conjunction
with native PIF comparators. For example,
IA-GE(=)
is allowed, whileIA(=<=)
is not allowed.
The value used must be appropriate to whatever the date and time
was when Workload Automation Programming Language started.
You can specify your own values to substitute for the equal sign (=)
by using OPTIONS DATE
and OPTIONS
TIME
.
You can also use the plus sign (+) or minus sign (–) in date
or time fields to set dates or time relative to the Workload Automation Programming Language internal
date and time. For example, VALFROM(+7)
will
be a date in 7 days time, STARTTIME(+10)
will
be in ten minutes time.
If you use the plus sign (+) or minus sign (–) in a time field, this might result in carry over to other fields if the addition or subtraction crosses a date boundary. Be aware that in some cases this can create an invalid value for some fields. The following fields perform automatic carryover:
OPTIONS TIME
will carry over intoOPTIONS DATE
- Long Term Plan
IAT
will carry over intoIAD
- Long Term Plan
PREIAT
will carry over intoPREIAD
- Batch Loader
ADOP STARTTIME
will carry over intoSTARTDAY
- Batch Loader
ADOP DLTIME
will carry over intoDLDAY
@
function,
which uses the input arrival of the occurrence in which the Workload Automation Programming Language job
is running, if the job is under HCL Workload Automation for Z control.For dates, the plus sign (+) or minus sign (–) adds or subtracts
a number of calendar days to the date. To add or subtract work days,
you can use the WD suffix. For example, ADD ADID(MYAPPL)
IADATE(+3WD)
adds the application to the plan 3 working
days from the current date.
When the job is being controlled by HCL Workload Automation for Z,
the calendar used by the calculation is the application calendar;
otherwise the default calendar, that you can set with OPTIONS
CALENDAR
, is used.
The calendar can be specified within the keyword by following the
date offset with a slash (/) and the calendar name, for example ADD
ADID(MYAPPL) IADATE(+3WD/MYCAL)
.