      * https://rosettacode.org/wiki/Day_of_the_week#COBOL
       PROGRAM-ID. dec25.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       1 WORK-DATE.
        2 YR PIC 9(4) VALUE 2008.
        2 MO-DA PIC 9(4) VALUE 1225. *> Dec 25
       1 WK-DATE REDEFINES WORK-DATE PIC 9(8).
       1 BINARY.
        2 INT-DATE PIC 9(8).
        2 DOW PIC 9(4).
       PROCEDURE DIVISION.
           PERFORM VARYING YR FROM 2008 BY 1
           UNTIL YR > 2121
               COMPUTE INT-DATE = FUNCTION INTEGER-OF-DATE (WK-DATE)
               COMPUTE DOW = FUNCTION MOD ((INT-DATE - 1) 7) + 1
               IF DOW = 7 *> Sunday
                   DISPLAY YR
               END-IF
           END-PERFORM
           STOP RUN
           .
       END PROGRAM dec25.
