manyone
New User
Joined: 09 Mar 2006 Posts: 21
|
|
|
|
I’ve posted a COBOL program that implements all twelve verses of “The Twelve Days of Christmas” using classic mainframe techniques—intended as a compact illustration of:
Tabular data handling with OCCURS and REDEFINES
Ordinal suffix generation (1st, 2nd, 3rd, etc.) via compact encoded literals
Bidirectional loop logic: the inner loop descends from the current day to day 1, mimicking cumulative look-back patterns common in period-to-date reporting (e.g., year-end inventory reconciliation)
The logic is implemented in two flavors:
GnuCOBOL (for PC development/testing)
COBOL-74 (fully compatible with MVS/TSO environments like TK4-)
Includes JCL for compile-and-go in TK4-, and uses only standard COBOL features—no external files or nonportable extensions.
🔗 GitHub: github.com/manyone/cobol-twelve-days |
|