900-DATE-ON-CALENDAR

900-DATE-ON-CALENDAR checks the input date against a named calendar to see if the date is marked. The routine returns true (T) if the date is marked; otherwise, it returns false (F). See Century Parameter Processing.

Note: All input dates are YYYYMMDD.
Library CALRTNS

Required Input

Field Type and length Definition
WSDR-CALENDAR A 15 Name of calendar to check.
WSDR-FR-DATE N 8

YYYYMMDD

Date to check as marked on the calendar.

Output

Field Type and length Definition
WSDR-DATE-IS-ON-CAL A 1 Set to Y if input date is marked, otherwise set to N.
WSDR-ERROR-NBR N 9

Error number.

See Error Number.

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

Error Number

Error Explanation
0 No error occurred.
23 Invalid date.
24 Invalid from date.
25 Invalid to date.
26 Invalid calendar.
33 Year Increment Out of Range.
34 Month Increment Out of Range.
35 Day Increment Out of Range.

Programming Example

       MOVE WHICL-CALENDAR                TO WSDR-CALENDAR.
       MOVE WO30F1-WOR-START-DATE         TO WSDR-FR-DATE.
       PERFORM 900-DATE-ON-CALENDAR.
       IF (WSDR-DATE-IS-ON-CAL NOT = "Y")
           MOVE 250                       TO CRT-ERROR-NBR
           MOVE WO30F1-WOR-START-DATE-FN  TO CRT-FIELD-NBR