CHKDATE
- Keyword
- Formats
- DATE1()
- YYYYMMDD, YYMMDD, YYYY/MM/DD, and YY/MM/DD
- DATE2()
- DDMMYYYY, DDMMYY, DD/MM/YYYY, and DD/MM/YY
If the date is valid, the CHKDATE instruction provides the value of the following variables that are based on the input date. The value reported in the table is calculated with an input date equal to 1997/09/28.
Variable | Description | Value |
---|---|---|
XYMD | Date in YYYYMMDD format | 19970928 |
XYMD1 | Date in YYMMDD format | 970928 |
XYMD2 | Date in YY/MM/DD format | 97/09/28 |
XYMD3 | Date in YYYY/MM/DD format | 1997/09/28 |
XDMY | Date in DDMMYYYY format | 28091997 |
XDMY1 | Date in DDMMYY format | 280997 |
XDMY2 | Date in DD/MM/YY format | 28/09/97 |
XDMY3 | Date in DD/MM/YYYY format | 28/09/1997 |
XDAY | Day of the week: 1–7; 1 = Monday, 2 = Tuesday… | 7 |
XDAYD | Day of the week (MON, TUE, WED, THU, FRI, SAT, or SUN) | SUNDAY |
XDD | Day of the month in DD format | 28 |
XDDD | Day of the year in DDD format (Julian day) | 271 |
XDDDYY | Date as a Julian date in DDYYYY format | 27197 |
XDDDYYYY | Date as a Julian date in DDDYYYY format | 2711997 |
XDE® | Ten-day period in the year | 28 |
XFDAY | First day of the month: 1 = Monday, 2 = Tuesday… | 1 |
XFDAYD | First day of the month | MONDAY |
XFDAYJ | First day of the month in DDD format (Julian day) | 244 |
XFDAYJ1 | First day of the month in YYYYDDD format | 1997244 |
XFF | Half of the month: 1 = first half, 2 = second half | 2 |
XFIRSTDE | First day of a 10-day period in a month | 19970921 |
XFIRSTQ | First day of the quarter in YYYYMMDD format | 19970901 |
XLASTDD | Last day of the month in DD format | 30 |
XLASTDDN | Last day of the next month | 31 |
XLASTDDP | Last day of the previous month | 31 |
XLASTDD1 | Last day of the month in YYYYMMDD format | 19970930 |
XLASTDD2 | Last day of the month in YYMMDD format | 970930 |
XLASTDD3 | Last day of the month in DDMMYYYY format | 30091997 |
XLASTDD4 | Last day of the month in DDMMYY format | 300997 |
XLSTDDJ | Last day of the month in DDD format (Julian day) | 273 |
XLSTDDJ1 | Last day of the month in YYYYDDD format | 1997273 |
XMM | Month in MM format | 09 |
XMMYY | Month and year in MMYY format | 0997 |
XMY | Date in MMYYYY format | 091997 |
XMMNAME | Name of the month | SEPTEMBER |
XMMP1 | Previous month in MM format | 08 |
XMMN1 | Next month in MM format | 10 |
XQUARTER | Quarter of the year | 3 |
XTOTWWM | Number of weeks in the month: 1–6 | 5 |
XWW1 | Week of the year | 39 |
XWWD | Week of the year and day of the week | 397 |
XWWLAST | Last week of the month: Y or N | N |
XWWMONTH | Week of the month: 1–6 | 4 |
XYM | Date in YYYMM format | 199709 |
XYYDDD | Date as a Julian date in YYDDD format | 97271 |
XYYYYDDD | Date as a Julian date YYYYDDD format | 1997271 |
XYY | Year in YY format | 97 |
XYYYY | Year in YYYY format | 1997 |
XYYMM | Year and month in YYMM format | 9709 |
XYYP | Previous year in YY format | 96 |
XYYYYP | Previous year in YYYY format | 1996 |
XYYMMP | Previous month in YYMM format | 9708 |
XYYYYMMP | Previous month in YYYYMM format | 199708 |
XYYN | Next year YY format | 98 |
XYYYYN | Next year in YYYY format | 1998 |
XYYMMN | Next month in YYMM format | 9710 |
XYYYYMMN | Next month in YYYYMM format | 199710 |
X1MOND | First Monday of the month in YYYYMMDD format | 19970901 |
X1MONDJ | First Monday of the month in DDD format (Julian day) | 244 |
X1MONDJ1 | First Monday of the month in YYYYDDD format (Julian day) | 1997244 |
X2MOND | Second Monday of the month in YYYYMMDD format | 19970908 |
X2MONDJ | Second Monday of the month in DDD format (Julian day) | 251 |
X2MONDJ1 | Second Monday of the month in YYYYDDD format (Julian day) | 1997251 |
X3MOND | Third Monday of the month in YYYYMMDD format | 19970915 |
X3MONDJ | Third Monday of the month in DDD format (Julian day) | 258 |
X3MONDJ1 | Third Monday of the month in YYYYDDD format (Julian day) | 1997258 |
X4MOND | Fourth Monday of the month in YYYYMMDD format | 19970922 |
X4MONDJ | Fourth Monday of the month in DDD format (Julian day) | 265 |
X4MONDJ1 | Fourth Monday of the month in YYYYDDD format (Julian day) | 1997265 |
X5MOND | Fifth Monday of the month in YYYYMMDD format | 19970929 |
X5MONDJ | Fifth Monday of the month in DDD format (Julian day) | 272 |
X5MONDJ1 | Fifth Monday of the month in YYYYDDD format (Julian day) | 1997272 |
XFREEDAY | F = free day, W = work day | F |
XYMDN1 | Calendar day + 1 in YYYYMMDD format | 19970929 |
XDDN1 | Calendar day + 1 in DD format | 29 |
XYMDN1 | Calendar day + 1 in DDMMYYYY format | 29091997 |
XYMDN2 | Calendar day + 2 in YYYYMMDD format | 19970930 |
XYMDN3 | Calendar day + 3 in YYYYMMDD format | 19971001 |
XYMDN4 | Calendar day + 4 in YYYYMMDD format | 19971002 |
XYMDN5 | Calendar day + 5 in YYYYMMDD format | 19971003 |
XYMDN6 | Calendar day + 6 in YYYYMMDD format | 19971004 |
XYMDN7 | Calendar day + 7 in YYYYMMDD format | 19971005 |
XYMDN8 | Calendar day + 8 in YYYYMMDD format | 19971006 |
XYMDN9 | Calendar day + 9 in YYYYMMDD format | 19971007 |
XYMDN10 | Calendar day + 10 in YYYYMMDD format | 19971008 |
XYMDN11 | Calendar day + 11 in YYYYMMDD format | 19971009 |
XYMDN12 | Calendar day + 12 in YYYYMMDD format | 19971010 |
XYMDN13 | Calendar day + 13 in YYYYMMDD format | 19971011 |
XYMDN14 | Calendar day + 14 in YYYYMMDD format | 19971012 |
XYMDN15 | Calendar day + 15 in YYYYMMDD format | 19971013 |
XYMDN16 | Calendar day + 16 in YYYYMMDD format | 19971014 |
XYMDN17 | Calendar day + 17 in YYYYMMDD format | 19971015 |
XYMDN18 | Calendar day + 18 in YYYYMMDD format | 19971016 |
XYMDN19 | Calendar day + 19 in YYYYMMDD format | 19971017 |
XYMDN20 | Calendar day + 20 in YYYYMMDD format | 19971018 |
XYMDN21 | Calendar day + 21 in YYYYMMDD format | 19971019 |
XYMDN22 | Calendar day + 22 in YYYYMMDD format | 19971020 |
XYMDN23 | Calendar day + 23 in YYYYMMDD format | 19971021 |
XYMDN24 | Calendar day + 24 in YYYYMMDD format | 19971022 |
XYMDN25 | Calendar day + 25 in YYYYMMDD format | 19971023 |
XYMDN26 | Calendar day + 26 in YYYYMMDD format | 19971024 |
XYMDN27 | Calendar day + 27 in YYYYMMDD format | 19971025 |
XYMDN28 | Calendar day + 28 in YYYYMMDD format | 19971026 |
XYMDN29 | Calendar day + 29 in YYYYMMDD format | 19971027 |
XYMDN30 | Calendar day + 30 in YYYYMMDD format | 19971028 |
XWDDN1 | Work day + 1 in DD format | 29 |
XWDMYN1 | Work day + 1 in DDMMYYYY format | 29091997 |
XWYMDN1 | Work day + 1 in YYYYMMDD format | 19970929 |
XWYMDN2 | Work day + 2 in YYYYMMDD format | 19970930 |
XWYMDN3 | Work day + 3 in YYYYMMDD format | 19971001 |
XWYMDN4 | Work day + 4 in YYYYMMDD format | 19971002 |
XWYMDN5 | Work day + 5 in YYYYMMDD format | 19971003 |
XWYMDN6 | Work day + 6 in YYYYMMDD format | 19971006 |
XWYMDN7 | Work day + 7 in YYYYMMDD format | 19971007 |
XWYMDN8 | Work day + 8 in YYYYMMDD format | 19971008 |
XWYMDN9 | Work day + 9 in YYYYMMDD format | 19971009 |
XWYMDN10 | Work day + 10 in YYYYMMDD format | 19971010 |
XWYMDN11 | Work day + 11 in YYYYMMDD format | 19971013 |
XWYMDN12 | Work day + 12 in YYYYMMDD format | 19971014 |
XWYMDN13 | Work day + 13 in YYYYMMDD format | 19971015 |
XWYMDN14 | Work day + 14 in YYYYMMDD format | 19971016 |
XWYMDN15 | Work day + 15 in YYYYMMDD format | 19971017 |
XWYMDN16 | Work day + 16 in YYYYMMDD format | 19971020 |
XWYMDN17 | Work day + 17 in YYYYMMDD format | 19971021 |
XWYMDN18 | Work day + 18 in YYYYMMDD format | 19971022 |
XWYMDN19 | Work day + 19 in YYYYMMDD format | 19971023 |
XWYMDN20 | Work day + 20 in YYYYMMDD format | 19971042 |
XWYMDN21 | Work day + 21 in YYYYMMDD format | 19971027 |
XWYMDN22 | Work day + 22 in YYYYMMDD format | 19971028 |
XWYMDN23 | Work day + 23 in YYYYMMDD format | 19971029 |
XWYMDN24 | Work day + 24 in YYYYMMDD format | 19971030 |
XWYMDN25 | Work day + 25 in YYYYMMDD format | 19971031 |
XWYMDN26 | Work day + 26 in YYYYMMDD format | 19971103 |
XWYMDN27 | Work day + 27 in YYYYMMDD format | 19971104 |
XWYMDN28 | Work day + 28 in YYYYMMDD format | 19971105 |
XWYMDN29 | Work day + 29 in YYYYMMDD format | 19971106 |
XWYMDN30 | Work day + 30 in YYYYMMDD format | 19971107 |
XYDDP1 | Calendar day - 1 in DD format | 27 |
XYMDP1 | Calendar day - 1 in YYYYMMDD format | 19970927 |
XYMDP2 | Calendar day - 2 in YYYYMMDD format | 19970926 |
XYMDP3 | Calendar day - 3 in YYYYMMDD format | 19970925 |
XYMDP4 | Calendar day - 4 in YYYYMMDD format | 19970924 |
XYMDP5 | Calendar day - 5 in YYYYMMDD format | 19970923 |
XYMDP6 | Calendar day - 6 in YYYYMMDD format | 19970922 |
XYMDP7 | Calendar day - 7 in YYYYMMDD format | 19970921 |
XYMDP8 | Calendar day - 8 in YYYYMMDD format | 19970920 |
XYMDP9 | Calendar day - 9 in YYYYMMDD format | 19970919 |
XYMDP10 | Calendar day - 10 in YYYYMMDD format | 19970918 |
XYMDP11 | Calendar day - 11 in YYYYMMDD format | 19970917 |
XYMDP12 | Calendar day - 12 in YYYYMMDD format | 19970916 |
XYMDP13 | Calendar day - 13 in YYYYMMDD format | 19970915 |
XYMDP14 | Calendar day - 14 in YYYYMMDD format | 19970914 |
XYMDP15 | Calendar day - 15 in YYYYMMDD format | 19970913 |
XYMDP16 | Calendar day - 16 in YYYYMMDD format | 19970912 |
XYMDP11 | Calendar day - 17 in YYYYMMDD format | 19970916 |
XYMDP18 | Calendar day - 18 in YYYYMMDD format | 19970910 |
XYMDP19 | Calendar day - 19 in YYYYMMDD format | 19970909 |
XYMDP20 | Calendar day - 20 in YYYYMMDD format | 19970908 |
XYMDP21 | Calendar day - 21 in YYYYMMDD format | 19970907 |
XYMDP22 | Calendar day - 22 in YYYYMMDD format | 19970906 |
XYMDP23 | Calendar day - 23 in YYYYMMDD format | 19970905 |
XYMDP24 | Calendar day - 24 in YYYYMMDD format | 19970904 |
XYMDP25 | Calendar day - 25 in YYYYMMDD format | 19970903 |
XYMDP26 | Calendar day - 26 in YYYYMMDD format | 19970902 |
XYMDP27 | Calendar day - 27 in YYYYMMDD format | 19970901 |
XYMDP28 | Calendar day - 28 in YYYYMMDD format | 19970831 |
XYMDP29 | Calendar day - 29 in YYYYMMDD format | 19970830 |
XYMDP30 | Calendar day - 30 in YYYYMMDD format | 19970829 |
XWDDP1 | Work day - 1 in DD format | 26 |
XWDMYP1 | Work day - 1 in DDMMYYYY format | 26091997 |
XWYMDP1 | Work day - 1 in YYYYMMDD format | 19970926 |
XWYMDP2 | Work day - 2 in YYYYMMDD format | 19970925 |
XWYMDP3 | Work day - 3 in YYYYMMDD format | 19970924 |
XWYMDP4 | Work day - 4 in YYYYMMDD format | 19970923 |
XWYMDP5 | Work day - 5 in YYYYMMDD format | 19970922 |
XWYMDP6 | Work day - 6 in YYYYMMDD format | 19970919 |
XWYMDP7 | Work day - 7 in YYYYMMDD format | 19970918 |
XWYMDP8 | Work day - 8 in YYYYMMDD format | 19970917 |
XWYMDP9 | Work day - 9 in YYYYMMDD format | 19970916 |
XWYMDP10 | Work day - 10 in YYYYMMDD format | 19970915 |
XWYMDP11 | Work day - 11 in YYYYMMDD format | 19970912 |
XWYMDP12 | Work day - 12 in YYYYMMDD format | 19970911 |
XWYMDP13 | Work day - 13 in YYYYMMDD format | 19970910 |
XWYMDP14 | Work day - 14 in YYYYMMDD format | 19970909 |
XWYMDP15 | Work day - 15 in YYYYMMDD format | 19970908 |
XWYMDP16 | Work day - 16 in YYYYMMDD format | 19970905 |
XWYMDP17 | Work day - 17 in YYYYMMDD format | 19970904 |
XWYMDP18 | Work day - 18 in YYYYMMDD format | 19970903 |
XWYMDP19 | Work day - 19 in YYYYMMDD format | 19970902 |
XWYMDP20 | Work day - 20 in YYYYMMDD format | 19970901 |
XWYMDP21 | Work day - 21 in YYYYMMDD format | 19970829 |
XWYMDP22 | Work day - 22 in YYYYMMDD format | 19970828 |
XWYMDP23 | Work day - 23 in YYYYMMDD format | 19970827 |
XWYMDP24 | Work day - 24 in YYYYMMDD format | 19970826 |
XWYMDP25 | Work day - 25 in YYYYMMDD format | 19970825 |
XWYMDP26 | Work day - 26 in YYYYMMDD format | 19970822 |
XWYMDP27 | Work day - 27 in YYYYMMDD format | 19970821 |
XWYMDP28 | Work day - 28 in YYYYMMDD format | 19970820 |
XWYMDP29 | Work day - 29 in YYYYMMDD format | 19970819 |
XWDYMD30 | Work day - 30 in YYYYMMDD format | 19970818 |
1 XWW is the variable updated by CHKDATE to show the week of the year, in terms of week number. It is a fixed calculation that starts the first day of the year and has a fixed length of seven days. It is assumed that week number 1 begins on January 1st, regardless of what day of the week it is. |
The IBM Z Workload Scheduler-supplied variable are calculated on the occurrence input arrival date and time, whereas the OCL variables are calculated on an input date, such as a date provided with a promptable variable.
The following table describes the keywords that can be used.
Keyword | Requirement | Multiple Values Allowed | Description | Abbreviation | Format |
---|---|---|---|---|---|
DATE1() | Required¹ | No | The input date
in the following formats: YYYYMMDD, YYYY/MM/DD, YYMMDD, or YY/MM/DD.
DATE1() and DATE2() are mutually exclusive. | YYMMDD | |
DATE2() | Required¹ | No | The input date
in the following formats: DDMMYYYY, DD/MM/YYYY, DDMMYY, or DD/MM/YY.
DATE2() and DATE1() are mutually exclusive. | DDMMYY | |
CALNAME() | Optional | No | The scheduler default calendar ID. It defaults to DEFAULT. | CAL | |
SUBSYS() | Optional | No | The scheduler subsystem name. It overrides the subsystem ID specified in a previous INIT instruction or in the EQQYRPRM member, except when you specify the SUBSYS() keyword in the EQQYPARM DD card. | ||
MSG() | Optional | No | It can be YES or NO. It specifies whether the program is to display the description and the values of the calculated variables in the OCL SYSOUT. It defaults to YES. | ||
INCVALUE() | Optional | No | This value indicates the decreasing value for the variables calculation. OCL will add days to, or subtract days from, an input date up to the incvalue. (OCL will calculate the new date +/- n work days or calendar days, where n is a value in the range 1–incvalue.) incvalue can be a value in the range 1–30 and overlays the value specified in PARMLIB. | INC | |
Note: Mutually exclusive
with another keyword. |
CHKDATE DATE2(&datac) MSG(NO) INC(15) CAL(calend01)
CHKDATE DATE2(201097) MSG(NO)
CHKDATE DATE1(&OYMD1) INC(2) MSG(NO)
CHKDATE DATE1(XWYMDN2) INC(20)
SETUPD var1 = XYMDN20
The first CHKDATE instruction
calculates the occurrence input arrival date plus 2 workdays. The
result is stored in the variable XWYMDN2. The second CHKDATE instruction
uses the variable XWYMDN2 as the input date to calculate the new date:
XWYMDN2 + 20 calendar days. The result is stored in variable XYMDN20,
which you can use, for example, to update the default value of a variable
in a variable table.- RESULT = 0
- Valid date.
- RESULT = 8
- Invalid date. Refer to the error messages.
CHKDATE DATE1('XWYMDN2') INC(20)