      * https://rosettacode.org/wiki/Holidays_related_to_Easter#COBOL
       IDENTIFICATION DIVISION.
       PROGRAM-ID. Easter.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       77  DAYS                   PIC 9(2).
       77  A                      PIC 9(2).
       77  B                      PIC 9(2).
       77  C                      PIC 9(2).
       77  D                      PIC 9(2).
       77  E                      PIC 9(2).
       77  F                      PIC 9(2).
       77  G                      PIC 9(2).
       77  H                      PIC 9(2).
       77  I                      PIC 9(2).
       77  K                      PIC 9(2).
       77  L                      PIC 9(2).
       77  M                      PIC 9(2).
       77  WEEK-DAY               PIC 9(1).
       77  NUMERATOR              PIC 9(4).
       77  INTEGER-DATE           PIC 9(18).

       01  MONTH-TAB VALUE "JanFebMarAprMayJunJulAugSepOctNovDec".
           05 MONTH-ABREVIATED    PIC X(3) OCCURS 12.

       01  WEEK-DAY-TAB           VALUE "SunMonTueWedThuFriSat".
           05 WEEK-DAY-ABREVIATED PIC X(3) OCCURS 7.

       01  EASTER-DATE            PIC 9(8).
       01  FILLER REDEFINES EASTER-DATE.
           05 EASTER-YEAR         PIC 9(4).
           05 EASTER-MONTH        PIC 9(2).
           05 EASTER-DAY          PIC 9(2).

       01  HOLIDAY-DATE           PIC 9(8).
       01  FILLER REDEFINES HOLIDAY-DATE.
           05 HOLIDAY-YEAR        PIC 9(4).
           05 HOLIDAY-MONTH       PIC 9(2).
           05 HOLIDAY-DAY         PIC 9(2).

       01  EDT-DATE.
           05 EDT-WEEK-DAY        PIC X(3).
           05 FILLER              PIC X VALUE SPACE.
           05 EDT-DAY             PIC Z(2).
           05 FILLER              PIC X VALUE SPACE.
           05 EDT-MONTH           PIC X(3).

       PROCEDURE DIVISION.
       MAIN.
           DISPLAY "Christian holidays, related to Easter,"
           "for each centennial from 1700 to 2100 CE:"
           PERFORM VARYING EASTER-YEAR FROM 1700 BY 100
           UNTIL EASTER-YEAR > 2100
              PERFORM OUTPUT-HOLYDAYS
           END-PERFORM
           DISPLAY " "

           DISPLAY "Christian holidays, related to Easter,"
           "for years from 2010 to 2020 CE:"
           PERFORM VARYING EASTER-YEAR FROM 2010 BY 1
           UNTIL EASTER-YEAR > 2020
              PERFORM OUTPUT-HOLYDAYS
           END-PERFORM
           DISPLAY " "

           STOP RUN
           .
       OUTPUT-HOLYDAYS.
           DISPLAY EASTER-YEAR " " NO ADVANCING
           PERFORM CALCULATE-EASTER

           MOVE 0 TO DAYS
           PERFORM ADD-DAYS
           DISPLAY " Easter: " EDT-DATE NO ADVANCING

           MOVE 39 TO DAYS
           PERFORM ADD-DAYS
           DISPLAY " Ascension: " EDT-DATE NO ADVANCING

           MOVE 49 TO DAYS
           PERFORM ADD-DAYS
           DISPLAY " Pentecost: " EDT-DATE NO ADVANCING

           MOVE 56 TO DAYS
           PERFORM ADD-DAYS
           DISPLAY " Trinity: " EDT-DATE NO ADVANCING

           MOVE 60 TO DAYS
           PERFORM ADD-DAYS
           DISPLAY " Corpus: " EDT-DATE
           .
       CALCULATE-EASTER.
           COMPUTE A = FUNCTION MOD(EASTER-YEAR, 19)
           COMPUTE B = EASTER-YEAR / 100
           COMPUTE C = FUNCTION MOD(EASTER-YEAR, 100)
           COMPUTE D = B / 4
           COMPUTE E = FUNCTION MOD(B, 4)
           COMPUTE F = (B + 8) / 25
           COMPUTE G = (B - F + 1) / 3
           COMPUTE H = FUNCTION MOD((19 * A + B - D - G + 15), 30)
           COMPUTE I = C / 4
           COMPUTE K = FUNCTION MOD(C, 4)
           COMPUTE L = FUNCTION MOD((32 + 2 * E + 2 * I - H - K), 7)
           COMPUTE M = (A + 11 * H + 22 * L) / 451
           COMPUTE NUMERATOR = H + L - 7 * M + 114
           COMPUTE EASTER-MONTH = NUMERATOR / 31
           COMPUTE EASTER-DAY = FUNCTION MOD(NUMERATOR, 31) + 1
           .
       ADD-DAYS.
           IF DAYS = 0
              MOVE EASTER-DATE TO HOLIDAY-DATE
              MOVE 1 TO WEEK-DAY
           ELSE
              COMPUTE HOLIDAY-DATE = FUNCTION DATE-OF-INTEGER(
              FUNCTION INTEGER-OF-DATE(EASTER-DATE) + DAYS)
              COMPUTE WEEK-DAY = FUNCTION MOD(FUNCTION INTEGER-OF-DATE(
              EASTER-DATE) + DAYS, 7) + 1
           END-IF
           MOVE WEEK-DAY-ABREVIATED(WEEK-DAY) TO EDT-WEEK-DAY
           MOVE MONTH-ABREVIATED(HOLIDAY-MONTH) TO EDT-MONTH
           MOVE HOLIDAY-DAY TO EDT-DAY
           .
