Jump to content

COBOL


proggR

Recommended Posts

  • 3 weeks later...

Hi

 

Have used it at work many years ago. Spent a year or 2 programming in Cobol with CICS for online apps in the late 1980s, plus some batch Cobol in the mid 1990s.

 

Personally do not like it as a langauge. Far too much typing to do a simple variable assignment ;D . And the use of full stops at the end of lines is far too random.

 

There are also a fair few major differences between the original Cobol and Cobol 2 (which is still over 20 years old).

 

Personally I far prefer PL/1 which is a similar age language dealing with similar data types but which uses more "conventional" mathematical syntax and which has decent support for pointers and for playing with bit strings (so you can easily manipulate the bits in a byte). For example one system I worked on had a structure for a customers address which was an array of 5 lines, each up to 30 bytes long. There was an variable to store the lengths of each address line, with each length stored in a single byte. PL/1 (and Cobol) support 2 binary numeric formats which are essentially 2 bytes or 4 bytes long, hence 1 byte is not supported. Basically the code we had extracted that single byte, overlayed it onto the address of a 2 byte binary field and used that. Doing this in PL/1 was easy but would be a pig in Cobol.

 

This might sound like a load of hassle, but memory and disk storage used to be hideously expensive. So saving potentially 10 bytes per customer (supply address and billing address) over 2m customers was a worthwhile saving.

 

All the best

 

Keith

Link to comment
https://forums.phpfreaks.com/topic/174364-cobol/#findComment-932245
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.