the ugly ocaml monstrosity powering my site oppi.li
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

noodle on mainframe modernization

+7 -7
+7 -7
posts/tales_from_mainframe_modernization.md
··· 8 8 some wonderful hacks to get around the limitations of the 9 9 system. Mainframes are also chock full of history. 10 10 11 - ### Base-2 numerics 11 + ### Base-10 numerics 12 12 13 13 This is the first thing that stood out to me when I looked 14 14 at COBOL code, a data-definition (the phrase for "variable") ··· 27 27 28 28 That statement declares a variable called `HEIGHT` with type 29 29 `9(3)`, which is shorthand for `999`, which indicates 30 - "3-digit number". Similarly `A(5)` indicates 5-character 31 - alphabetic string. 30 + "3-digit number". The possible values for this variable are 31 + `0` to `999`! 32 32 33 33 ### Internationalisation 34 34 ··· 99 99 01 DATE. 100 100 05 DD PIC 9(2). 101 101 05 FILLER PIC X. 102 - 05 MM PIC 9(2). 102 + 05 MMM PIC A(3). 103 103 05 FILLER PIC X. 104 104 05 YYYY PIC 9(4). 105 105 ··· 107 107 . 108 108 . 109 109 110 - MOVE "03/04/2025" TO DATE. 110 + MOVE "03 MAR 2025" TO DATE. 111 111 DISPLAY "DAY: " DD. *> DAY: 03 112 - DISPLAY "MONTH: " MM. *> MONTH: 04 112 + DISPLAY "MONTH: " MMM. *> MONTH: MAR 113 113 DISPLAY "YEAR: " YYYY. *> YEAR: 2025 114 114 115 115 *> also works: 116 - MOVE "03.04.2025" TO DATE. 116 + MOVE "03-MAR-2025" TO DATE. 117 117 ``` 118 118 119 119 ### Early exit