Skip to Content

COBOL 74 VS COBOL 85

COBOL 74 VS COBOL 85

Capt Uday Prasad

During the dawn of the 1980s, the mainframe's steady growth was the lifeblood of American corporations. These colossal computers, residing in specialized rooms, handled the vast data streams essential to business operations. COBOL, the time-honored language of trade, was its primary means of expression.

Yet, beneath the surface, a growing tension was brewing. People were predicting downfall of Cobol and bending towards the upcoming - Object Oriented Programming concepts.

By the 1980s, structured programming principles were gaining widespread acceptance. Older COBOL versions, particularly COBOL74, were often criticized for their reliance on GO TO statements, which could lead to "spaghetti code" that was difficult to maintain.  

The need for more organized, modular, and maintainable code was becoming increasingly important as businesses relied more heavily on their mainframe systems.

While OOP was still in its relative infancy in the 1980s, its potential was becoming clear. Languages like Smalltalk and C++ were gaining traction, and the concepts of encapsulation, inheritance, and polymorphism were seen as the future of software development.

COBOL, with its procedural nature, was perceived as outdated in comparison. There was a growing concern that COBOL would become obsolete if it didn't adapt to these new programming paradigms.

 The COBOL programmers who had built empires on lines of procedural code, felt a tremor in the digital landscape. A new breed of programmers, whispering of "Objects", “Polymorphism” and "Inheritance," were emerging from the shadows of academia and nascent tech startups. Their languages, sleek and modern, promised a revolution, a way to build software that was more flexible, more powerful, more… elegant.

The whispers grew louder, fueled by the rising tide of structured programming. The old ways, the tangled webs of GO TO statements that had served their purpose, were now seen as relics of a bygone era. "Spaghetti code," they called it, a tangled mess that was difficult to understand, even for the most seasoned COBOL veteran.

In the boardrooms of the great corporations, a silent battle was being waged. The CIOs, tasked with keeping the lights on and the data flowing, faced a critical dilemma. Should they cling to the familiar comfort of COBOL, the language that had built their fortunes? Or should they embrace the uncertain promise of these new, object-oriented languages, risking the stability of their core systems?

The answer, as it often does, lay in compromise. COBOL, the bedrock of business, couldn't simply be discarded. It was too deeply ingrained, too vital to the daily operations of countless organizations. But it had to evolve. It had to adapt to the changing times, to the demands of a world that was becoming increasingly complex and interconnected.

The Birth of COBOL 85

And so, COBOL 85 was born. A language reborn, infused with the spirit of structured programming, armed with new tools like END-IF and END-PERFORM, designed to tame the wild tangles of code. Intrinsic functions, those built-in workhorses, were added, giving COBOL the muscle it needed to handle the growing demands of modern business. Error handling was refined, made more precise, more robust.

It was a quiet revolution, a subtle shift in the balance of power. The old COBOL developers, while initially skeptical, found themselves embracing the new features, discovering that COBOL 85 was not a betrayal of their legacy, but a testament to its enduring strength. The mainframe, that tireless workhorse, continued its steady hum, now with a slightly more modern, more refined voice. It had proven, once again, that it could adapt, that it could survive, that it could thrive in the face of change. And so, COBOL, the language of business, stepped into the future, ready to face the challenges of a new era.

Here are the key differences between the two:-

Key Differences

 

Feature

COBOL 74

COBOL 85

Control Structures

Limited structured programming constructs (e.g., GOTO was widely used)

Introduced structured programming constructs (e.g., END-IF, EVALUATE, scope terminators)

IF Statements

Required nesting with NEXT SENTENCE

Introduced END-IF for better readability

EVALUATE Statement

Not available

Introduced to replace complex nested IFs (similar to a CASE statement)

PERFORM Statement

PERFORM only supported fixed-range loops

Introduced PERFORM UNTIL and PERFORM VARYING for better looping control

Scope Terminators

Not available. A period was used on all the lines of a paragraph in Procedure Division.

Introduced terminators like END-IF, END-PERFORM, END-READ, etc., improving readability. Period to be used only on the last line of each paragraph in Procedure division.

String Handling

Required manual string manipulation

Introduced STRING and UNSTRING for easier text processing

IN LINE PERFORM

Not available

Allowed in-line procedures using PERFORM ... END-PERFORM, eliminating the need for separate paragraphs

CONTINUE Statement

Not available

Next sentence was used

Introduced for better flow control within constructs

Nested Programs

Not supported

Introduced nested programs, allowing subprograms within a main program

INITIALIZE Statement

Not available

Added for easier variable initialization

More Readable Code

Relied heavily on GO TO and PERFORM THRU

Encouraged structured, modular, and maintainable coding style

Improved I/O Handling

Not supported

COBOL85 enhanced I/O (input/output) handling, including:

NOT clauses: Such as NOT ON SIZE ERROR, NOT AT END, and NOT INVALID KEY, which provided more precise error handling.

Note - It's important to note that specific compiler implementations (like IBM's) might have introduced their own extensions beyond the standard. Therefore, the exact differences could vary depending on the specific COBOL compiler being used.

 

 Advantages of COBOL 85 over COBOL 74

  • Improved readability and maintainability.
  • Reduced reliance on GO TO, making code more structured.
  • Easier debugging and error handling.
  • More powerful control structures like EVALUATE, END-IF, and structured loops.
  • Enhanced productivity due to better string handling and initialization features.

 Conclusion

COBOL 85 significantly improved over COBOL 74 by introducing structured programming concepts, making programs more readable, maintainable, and efficient.

Many organizations transitioned from COBOL 74 to COBOL 85 to take advantage of these enhancements.

                         --------------XXXXXXXXX----------

 

ZEDINFOTECH, prasad.uday60@gmail.com 1 May 2025
Tags
Archive
What the world doesnot know about GDG files used on MAINFRAMES