U@GETNBDYOCAL counts the number of marked days on a specific calendar between a "from" and a "to" date. The "from" date must precede the "to" date; this is not validated. The routine returns false (0) if an error is found. See .
Required Input
| Field |
Type and length |
Definition |
| E@DRCALENDAR |
A 15 |
Name of calendar to check. |
| E@DRFRDATE |
N 8 |
Date to check from for marked calendar dates (this date is not included). |
| E@DRTODATE |
N 8 |
Date to check to for marked calendar dates (this date is included). |
Output
| Field |
Type and length |
Definition |
| E@DRNBRDOC |
N 9 |
The number of marked days on a specific calendar between the specified dates. Always set. |
| E@DRERRORNBR |
N 9 |
Error number.
See Error Number |
| E@DRERRORVAR |
A 20 |
Input parameter is in error. |
Programming Example
IF F1@WHSTDT > *ZEROS
AND F1@WHENDT >= F1@WHSTDT
EVAL E@DRFRDATE = F1@WHSTDT
EVAL E@DRTODATE = F1@WHENDT
CALLP U@NBDYINDTRNG Nbr Days In Date Rng
EVAL E@DRCALENDAR = VWHICL@CLNDR
CALLP U@GETNBDYOCAL Get Nbr Days On Cal
IF E@DRNBRDAYS <> E@DRNBRDOC
EVAL E@MSGNBR = 114
|