900-GET-NBR-DAYS-ON-CAL 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 |
WSDR-CALENDAR |
A 15 |
Name of calendar to check. |
WSDR-FR-DATE |
N 8 |
Date to check from for marked calendar dates (this date is not included). |
WSDR-TO-DATE |
N 8 |
Date to check to for marked calendar dates (this date is included). |
Output
Field |
Type and length |
Definition |
WSDR-NBR-DAYS-ON-CAL |
N 9 |
The number of marked days on a specific calendar between the specified dates. Always set. |
WSDR-ERROR-NBR |
N 9 |
Error number.
See Error Number. |
WSDR-ERROR-VAR |
A 20 |
Input parameter is in error. |
Programming Example
IF (WO20F1-WOH-START-DATE > ZERO)
AND (WO20F1-WOH-END-DATE NOT < WO20F1-WOH-START-DATE)
MOVE WO20F1-WOH-START-DATE TO WSDR-FR-DATE
MOVE WO20F1-WOH-END-DATE TO WSDR-TO-DATE
PERFORM 900-NBR-DAYS-IN-DATE-RNG
MOVE WHICL-CALENDAR TO WSDR-CALENDAR
PERFORM 900-GET-NBR-DAYS-ON-CAL
IF (WSDR-NBR-DAYS NOT = WSDR-NBR-DAYS-ON-CAL)
MOVE 114 TO CRT-MSG-NBR
|