540-COMPUTE-WEEKDAY

Note: This routine is provided for backward compatibility. Use or instead, depending on the output you want.

The 540-COMPUTE-WEEKDAY routine calculates which day of the week the input date is. The input date is assumed to be valid.

Library DATERTNS

Required Input

Field Type and length Definition
DATE-1 N 8 Date to be computed.

Output

Field Type and length Definition
DAY-NBR N 4 1 = Sunday, 2 = Monday, and so on.
WEEK-DAY A 9 Sunday, Monday, and so on.

Example

*       Find day of week.
        MOVE input-date                         TO DATE-1.
        PERFORM 540-COMPUTE-WEEKDAY.