900-GET-NBR-DAYS-IN-CAL-LS

900-GET-NBR-DAYS-IN-CAL-LST calculates the number of marked days in a date range from a list of calendars. It only counts the marked days that all of the calendars have in common. The "from" date must precede the "to" date; the order of "from" and "to" is not checked. The number and names of the calendars are validated. The routine returns false (0) if an error is found. See Century Parameter Processing.

Library CALRTNS

Required Input

Field Type and length Definition
WSDR-CAL-LST-GRP A 15 Contains WSDR-CAL-LST-GRP that occurs ten times.
WSDR-NBR-CALENDARS N 8 Number of calendars.
WSDR-FR-DATE N 8 Start date for checking marked calendar dates (this date is not included).
WSDR-TO-DATE N 8 End date for checking marked calendar dates (this date is included).

Output

Field Type and length Definition
WSDR-NBR-DAYS-ON-CAL N 8 Number of marked days in a date range from the list of calendars.
WSDR-ERROR-NBR N 9

Error number.

See Error Number.

WSDR-ERROR-VAR A 20 Input parameter is in error.

Programming Example

*    Find number of available business days.
     MOVE calendar-names               TO WSDR-CAL-LST-GRP.
     MOVE number-of-names              TO WSDR-NBR-CALENDARS.
     MOVE start-date                   TO WSDR-FR-DATE.
     MOVE stop-date                    TO WSDR-TO-DATE.
     PERFORM 900-GET-NBR-DAYS-IN-CAL-LST.