COBOL, programming language history

Clock
06.12.2024
An eye
64
Hearts
0
Connected dots
0
Connected dots
0
Connected dots
0

Introduction

COBOL (common business-oriented language) is a high-level programming language for managing financial transactions in applications around the world and on all platforms.
Grace Hopper is considered the grandmother or mother of this language, although she had nothing to do with the development or design of this language. She is called this because COBOL was based on another language, FLOW-MATIC, which she was involved in creating. This language is also called B-0 or Business Language Version 0.
A black-and-white picture of creator of COBOL, Grace Murray
But COBOL is still, ( by the state of 2024):
  1. 95% of ATM swipes rely on COBOL code
  2. 43% of banking systems are built on COBOL
  3. 80% of in-person transactions use COBOL
  4. 220 billion lines of COBOL in use today
Such success became possible thanks to the support and initiative of the US Department of Defense, which considered this language convenient and portable to different systems. We must not forget the fact that COBOL was, in fact, the first programming language for working with finances, monetary transactions, and transfers.
Where is it used now?
  1. Many financial and banking institutions use systems and programs written in COBOL.
  2. In government agencies and institutions.
  3. In retail and some logistics companies, they use it for inventory and order processing.
  4. Produces ATM transactions and interbank transfers.
The current standard is ISO/IEC 1989:2023 , which can be found online.
To get acquainted with the full document, you will need to buy it ⊙.☉. Or google it well.

Reasons for the creation and the first version of COBOL, COBOL-60

It all started on May 28-29, 1959, when a meeting was held at the Pentagon to create a common programming language for business. At that time, the most popular language was FORTRAN, but it did not have the necessary functionality to be useful when writing business or financial applications.
At this meeting, 41 people participated, and they concluded that this language should be easy to learn and be applicable in various fields of activity. Starting from the financial sector and ending with inventory management in warehouses.
Later, the committee met again on June 4, 1959, and established the Committee on Data Systems Languages ​​(CODASYL). Then the committee determined all the advantages and disadvantages of the FLOW-MATIC and COMTRAN languages ​​​​and later developed COBOL based on them. Grace Hopper herself said:
COBOL 60 is 95% FLOW-MATIC and that COMTRAN had had an "extremely small" influence.
There was also a chance that this language would die without being born. The thing is that soon the committee received a copy of another language FACT, which was created by Roy Nath. At first, it surprised everyone (in a good way), but the fact that this language was created without regard for portability or the absence of any example of use in the real world, it was abandoned. This is how COBOL-60 appeared.

From COBOL-61 to COBOL-65

COBOL-61 was not fully backward compatible with 60. CODASYL did not introduce much new functionality into this version because it wanted structural changes. If 60 was a concept that was supposed to show whether this language was needed or not, and it turned out it was, then 61 was a solid foundation, a base for all subsequent versions.
After version 61, an extended version appeared. It again changed the internal structure of the language in some way. That is why COBOL-61 and COBOL-61 Extended are compatible, but not quite ;). Here are the main changes that were made to COBOL-61 Extended:
  1. The addition of the sort feature.
  2. The addition of the report writer option.
  3. The modification of the arithmetics to include multiple receiving fields and to add the CORRESPONDING option to the ADD and SUBTRACT statements.
In 1962, IBM announced that COBOL would become their primary development language and that further use of COMTRAN would be discontinued. Thus, COBOL lost its main competitor.
The following changes were made in version 65:
  1. The inclusion of a series of options to provide for the reading, writing, and processing of mass storage files.
  2. The addition of the table handling feature, which includes indexing and search options.
  3. The modification of the specifications to delete the requirement for specific error diagnostic messages.
  4. The deletion of the terms "required" and "elective"

From COBOL-68 to COBOL-84

COBOL-68

Other versions before 68 did not have any common standard. And the main goal in developing the COBOL-68 version was to create a language standard, which ANSI did, creating USA Standard COBOL X3.23. And here are other changes that were made in COBOL-68:
  1. The inclusion of inter-program communication and the concept of a run unit.
  2. The elimination of redundant editing clauses and certain data clauses more succinctly expressed by the PICTURE clause.
  3. An improved COPY specification for all divisions except the Identification Division and the elimination of the INCLUDE statement.
  4. The inclusion of a hardware independent means of specifying and testing for page overflow conditions.
  5. The elimination of type 4 abbreviations.
  6. The elimination of the DEFINE statement.
  7. The inclusion of the REMAINDER phrase in the DIVIDE statement.
  8. The deletion of NOTE and REMARKS in favor of a general comment capability for all divisions.
  9. The inclusion of the SUSPEND statement as additional means of controlling graphic display devices.
  10. The inclusion of additional abbreviations.

COBOL-69

By this time, this language had become the most widespread in the world and work on its improvement was carried out every year. The main changes that were made in COBOL-69:
  1. The deletion of the EXAMINE statement and the inclusion of a more powerful statement, INSPECT, in its place.
  2. The inclusion of a communication facility to permit input and output with communication devices.
  3. The inclusion of the STRING and UNSTRING statements to facilitate character string manipulation.
  4. Deletion of the CONSTANT SECTION of the Data Division.
  5. The inclusion of a compile time page ejection facility.
  6. The inclusion of a facility to access the system's date and time.
  7. The inclusion of the SIGN clause.

COBOL-70

The major changes that were made in COBOL-70 were:
  1. The deletion of the RANGE clause.
  2. The inclusion of the INITIALIZE statement.
  3. The inclusion of a debugging facility.
  4. The inclusion of a merge facility.
  5. A complete revision of the report writer function

COBOL-73

The major changes that were made in COBOL-73 were:
  1. A revision and extension to the mass storage facility.
  2. A clarification and extension to the COBOL library facility.
  3. An enhancement of the INSPECT statement.
  4. A revision to the file control entry for a sort or merge file which included the deletion of format 3.
  5. A revision to the RERUN facility.
  6. The removal of the restriction on 77 level-numbers that they must precede 01 level numbers.
  7. The inclusion of a page advancing feature as part of the WRITE statement.
  8. An enhancement of the LINAGE clause to permit specification of margins.

COBOL-76

The major changes that were made in COBOL-76 were:
  1. The inclusion of a data base facility which interfaces with the CODASYL Data Description Language Journal of Development.
  2. The inclusion of collating sequence and character set declarations.
  3. The inclusion of a boolean (bit) manipulation facility.
  4. The inclusion of a de-editing facility.
  5. The inclusion of a reference modification facility.
  6. The inclusion of extensions to the file processing capabilities in the Environment and Data Divisions.
  7. The inclusion of the DELETE FILE statement.
  8. The inclusion of the PURGE statement.
  9. The inclusion of a variable length record facility.
  10. The removal of random processing specifications.
  11. The removal of the ALTER statement.
  12. The removal of all numeric paragraph-names and section-names.
  13. The removal of the OPEN REVERSED facility.
  14. The removal of level-number 77.
  15. Realignment of clauses between the Environment and Data Divisions.
  16. An option to omit the FILLER clause.
  17. An enhancement to the table handling facility to allow specification of tables having more than three dimensions.
  18. An enhancement to the DISPLAY statement to allow NO ADVANCING.
  19. An enhancement to the INSPECT statement to simplify data transformation.
  20. The extension of the SORT and MERGE statements to permit multiple file specifications in the GIVING phrase.
  21. The extension of the SORT and MERGE statements to relative and indexed files.
  22. The extension of the use of OPTIONAL to all file organizations.

COBOL-78

The major changes that were made in COBOL-78 were:
  1. The inclusion of a facility to specify symbolic-characters and positionally relate them to the native character set or the user-defined alphabet.
  2. The inclusion of an inter-program communication facility to permit communication between constituent programs in a run unit.
  3. The inclusion of a global and external specification for data items.
  4. The inclusion of additional facilities to support structured programming, including implicit and explicit terminators to delimit the scope of statements and the CONTINUE statement.
  5. The inclusion of a multi-branch, multi-join structure, the EVALUATE statement, to cause multiple conditions to be evaluated.
  6. The inclusion of an in-line PERFORM statement capability.
  7. The inclusion of a data base locking facility to maintain data base integrity.
  8. The inclusion of a facility to specify overprinting and character substitution on a receiving communication device or output device.
  9. The inclusion of the current volume pointer to facilitate exact specification of the current physical volume of a sequential file.
  10. The inclusion of a facility for record selection by defined record keys.
  11. The inclusion of the ROLLBACK statement.
  12. The inclusion of the REPLACE statement.
  13. The inclusion of a facility in the SET statement to assign a value to a condition-name.
  14. The inclusion of numeric paragraph-names and section-names.
  15. The inclusion of a facility for transaction oriented communication.
  16. The inclusion of facility to control input-output in separately compiled programs.
  17. The modification of specifications for data base keys, record keys, and realms.
  18. The modification of currency indicators for use in maintaining position during update of a data base.
  19. Modifications to facilitate the compatibility between the COBOL subschema facilities and the CODASYL Data Description Language.
  20. The expansion and clarification of data base status indicators.
  21. The deletion of comment-entries.

COBOL-85

In 1980, a new version was proposed with its improvements and innovations. But the joke was that this version had almost no backward compatibility. This caused a storm of indignation and harsh statements. Someone even wanted to sue the committee because of the lack of backward compatibility. And in this environment, work began to improve the standard. A public review was conducted; out of 2200 responses, 1700 were negative <(_ _)>
The major changes that were made in COBOL-80 were:
  1. The inclusion of a floating point data representation, including literals and editing pictures.
  2. The inclusion of two new usages called BINARY and PACKED-DECIMAL.
  3. A change in the ADVANCING phrase of the WRITE statement to allow positioning anywhere on a logical page.
  4. A change in the REDEFINES clause to allow the redefining item to be either larger or smaller than the item it redefines.
  5. A change to subscripting to allow arithmetic expressions as subscripts and to allow index-names to be used along with arithmetic expressions.
  6. The deletion of the DATA RECORDS clause.
  7. The inclusion of a RECONNECT statement to modify set membership.
  8. The deletion of the ENTER statement and a change to the CALL statement to allow languages other than COBOL to be called.
  9. A change to the use of comma and semicolon to allow them to be used anywhere a space can appear.
  10. The semantics for lowercase letters were defined.
  11. The deletion of the CORRESPONDING option.
  12. The inclusion of an EXIT PERFORM statement.
  13. The deletion of the debug facility (except for debugging lines).
  14. The inclusion of a facility to allow the specification of initial values for table items.
  15. The inclusion of a FETCH statement.
  16. The elimination of the requirement for a paragraph-name after a section-name or at the beginning of a program.
  17. The deletion of key-names from the data base facility.
  18. A change to the intermediate data item to expand it to 20 digits.
  19. The expansion and addition of various file status codes
Before the release of the latest standard, another survey was conducted, and the result was that only 25 reviewers answered negatively, out of 2200. Here are the main changes that were made in COBOL-85:
  1. The inclusion of a FALSE phrase in the SET statement.
  2. The deletion of the literal phrase from the STOP statement.
  3. The deletion of the SYNCHRONIZED clause.
  4. The inclusion of the WHEN-COMPILED function to return time and date of compilation; the DATE-COMPILED entry was deleted.
  5. The change of boolean operators from AND, EXOR, NOT, and OR to B-AND, B- EXOR, B-NOT, and B-OR.
  6. The inclusion of the NUMVAL, NUMVAL-C, and NUMVAL-F functions.
  7. The revision of the rules for evaluation of arithmetic expressions to enhance compatibility and portability.
  8. The inclusion of the VALIDATE facility.
  9. The inclusion of the ARITHMETIC clause in the OBJECT-COMPUTER paragraph to allow the selection of standard or native arithmetic.
  10. The deletion of the restrictions on the use of explicit scope delimiters and the NOT phrases of conditional statements.
  11. The inclusion of the LESS THAN operator in the START statement.
  12. The inclusion of the COLLATING SEQUENCE clause in the file control entry of an indexed file and the deletion of the CODE-SET clause for indexed files.
  13. The revision of the rules for the READ statement to disallow executing a READ statement after an at end condition is encountered.
  14. The inclusion of the relational operators B-LESS, CONTAINS, and IS CONTAINED IN for boolean items.
  15. The inclusion of in-line comments.
  16. The inclusion of a CLASS clause in the SPECIAL-NAMES paragraph and a class test for a user-defined class.
  17. The inclusion of a WITH STATUS phrase and a WITH ERROR STATUS phrase in the STOP statement.
  18. (18) The restoration of the integer-l TO integer-2 phrase in the RECORD CONTAINS clause; also the inclusion of explicit rules on the implementor-defined aspects of this clause and the absence of a RECORD clause.
  19. The revision of the rules for computing the remainder in the DIVIDE statement.
  20. The deletion of the RERUN clause.
  21. The deletion and revision of several I-O status values

Object-Oriented COBOL

In the early 1990s, work began to add object-oriented programming to the next version of COBOL. Object-oriented features were taken from C++ and Smalltalk. The final approved ISO standard was approved and published in late 2002.
Although COBOL now supports classes and objects, it was originally procedural. And even now, many programs in this language do not use OOP features, such as:
  1. The ability to define classes that include class object definitions and object definitions.
  2. The ability to define data that is encapsulated within class and object objects.
  3. The ability to define methods on class and object objects.
  4. The ability to use inheritance and define subclasses.
  5. The ability to use polymorphism and interfaces for maximum flexibility.
  6. The ability to define data members that can hold references to objects.
  7. The ability to call methods on objects.
  8. The ability to create and manage objects as needed.
  9. The ability to use objects as a normal part of COBOL programming when developing new programs and maintaining existing programs.

COBOL 2014

Between 2003 and 2009, three technical reports were written describing object finalization, XML processing, and collection classes for COBOL.
The purpose of object finalization is to free up resources that would otherwise not be freed by the normal garbage collection process. Examples include open files, temporary work files, database connections, TCP/IP socket interfaces, and network connections. In 2003, object finalization, the de facto garbage collector, was added.
In 2007, the ability to work with and process XML documents as well as regular files was added. The new syntax for processing XML documents is:
  1. Is based on the familiar approach used with COBOL I/O support
  2. Provides Document Object Model (DOM) style parsing
  3. Handles multiple input sources to handle XML in an extremely flexible manner
  4. Reads, updates, and writes XML documents
  5. Checks that XML documents are well-formed
  6. Provides an optional validity check of an XML document against a schema or Document Type Definition (DTD).
In 2009, additional interfaces for working with collections of objects were added.
All data on changes and updates to the COBOL language, from COBOL-60 to COBOL-84, were taken from this document.

About the language in the current state

In 2023, the following changes were made to the language:
  1. Asynchronous message syntax using SEND and RECEIVE statements
  2. Transaction processing facility with COMMIT and ROLLBACK
  3. XOR logical operator
  4. CONTINUE operator can be extended to pause the program for a specified time
  5. DELETE FILE statement
  6. LINE SEQUENTIAL file organization
  7. Defined infinite loop with PERFORM UNTIL EXIT
  8. SUBSTITUTE built-in function allowing substitution of substrings of different lengths
  9. CONVERT function for base conversion
  10. Logical shift operators
There is no information yet about the full implementation of this standard.
Also, the emergence of an automation tool can be considered a significant event. On August 22, 2023, IBM announced the Watsonx Code Assistant for Z tool based on artificial intelligence for automated translation of code from the ancient programming language COBOL to Java.
The latest released version from IBM is COBOL 7.4. All documentation about the language can be downloaded or read online at https://www.ibm.com/docs/ru/i/7.4?topic=languages-cobol. Or you can download this document.


Comments

(0)
captcha
Send
It's empty now. Be the first (o゚v゚)ノ

Used termins

Related questions