Was there anything inside Cobol that made him susceptible to Y2K issues?

I know that many of Y2K's efforts / fears were somehow focused on COBOL, deservedly or not. (hell, I saw a minor Y2K error in Perl scripts that crashed 1/1/2000)

What interests me is whether there was anything special for COBOL as the language that made it susceptible to Y2K problems?

That is, unlike the entire age of most programs written on it and the subsequent need to save on the use of memory / disk, due to old equipment, and the fact that no one expected that these programs would survive for 30 years?

I am completely happy if the answer “nothing special for COBOL except age” is just curious, not knowing anything about COBOL.

+3
source share
10 answers

Yes and no. In COBOL, you had to declare variables in such a way that you really needed to say how many digits were in the number, i.e. YEAR 99 Declared the YEAR variable so that it could only contain two decimal digits, so yes, it was easier to make this error than in C if you had int or short or char like a year, and you still have a lot of space for years in excess of 99. Of course, this will not protect you from printing 19% d in C and there is still a problem in your release, or other internal thinking-based calculations will be less than 99.

+4
source

It was 80% of the storage capacity, clean and simple.

, 1980 . , ? 100 000 , 20 .

+8

, , , , 2- .

, COBOL, , COBOL , , , .

+1

- Cobol Y2K?

1. , COBOL 2.


< > 1: 30 . . , 2 , 30 , , .

2: ​​ , . >

+1

. Y2K, ? , . , ( ). Cobol : , .

, Y2Kish... , . , , , Y2Kish, ( , , ).

, Y2Kish , , , , ( Java, ), (, ). ? Date ( ) , OS-smart-smart . , ... !

( ) , , , Y2Kish.

+1

. 1- / Cobol 2- 80 .

. 2- , , ! COBOL , , , . , !

-, COBOL 80 (- !), , . , "2000 , !" 2 !

+1

, 0 99 ( , ). , .

- . .

0

COBOL , .

  • , ,
  • , pre-internet, pre-social-networking, NIH, , .
  • , , , .
  • , , , 2 , ,
  • , SQL. , , .
  • "printf" , n

Fortran . , 3000 , . , COBOL, , .

0

COBOL - .

, .

. , 40 . Y2K .

( . , COBOL, 1950- 2027 , , 1970- , 2079 ).

, COBOL ....

03 ORDER-DATE     PIC DATE.

... , .

: .

0

COBOL 85 (1985 standard) and earlier versions had no way to get the current century **, which was one of the factors inherent in COBOL, which did not encourage the use of four-digit years even after 2 bytes of extra storage was no longer a problem .

** Specific implementations may have had non-standard extensions for this purpose.

0
source

Source: https://habr.com/ru/post/1718340/


All Articles