4 ms·
This is a good question. I found a copy of Fujitsu COBOL 85 manual [1] (the next release was post y2k, in 2002) and was surprised to see that CURRENT-DATE, INTE
by zwp 7y ago
This is a good question. I found a copy of Fujitsu COBOL 85 manual [1] (the next release was post y2k, in 2002) and was surprised to see that CURRENT-DATE, INTEGER-OF-DATE use 4-digit years.
However some functions from that time (eg ACCEPT, p. 544) do use 2-digit years. I think you have it exactly right, it was about facilitating string formatting/display: ACCEPT took input from the terminal screen. (I think it is, approximately, gets() + strptime(), though I don't see any talk of error handling). Programmers probably just stuffed the result into a record before writing to DASD (disk), optimizing for programmer time and program complexity over storage.
Perhaps 2-digit years for ACCEPT were an optimization for data entry workers?
A modern z/OS COBOL guide [2] has 4-digit years throughout as far as I can see.
Whilst I'm here, I'm also going to say: "VSAM", "PDS", TSO", "LRECL" and "ABEND" (just because I haven't heard those words for a quarter century and now I'm feeling nostalgic).
[1] http://testa.roberta.free.fr/My%20Books/Mainframe/Fujitsu%20COBOL%20-%20Language%20Reference.pdf http://testa.roberta.free.fr/My%20Books/Mainframe/Fujitsu%20...
[2] https://www.ibm.com/support/knowledgecenter/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/PGandLR/ref/rlpsacce.htm https://www.ibm.com/support/knowledgecenter/SS6SG3_4.2.0/com...
- JackFr 7y agoWhat about "JCL" ? Those ABENDs don't just show up on their own.