Primer: Object-Oriented Cobol

By Kevin Fogarty Print this article Print

Anything you can do to update Cobol, make it more available outside the mainframe environment, or tweak it to reflect new business rules will help.

What is it? A demonstration that it's possible to teach an old dog new tricks, long past the time anyone thought the dog had any trick left in it.

Cobol (Common Business Oriented Language)is one of the oldest and most widespread programming languages used to create or maintain business applications. Though nearly 5 billion lines of new Cobol code are written every year, Cobol itself is generally considered, if not dead, then hopelessly obsolete. That is unfair in that modern Cobol development tools and compilers support all the technology other languages support. Cobol is not only well-known, it's also available royalty-free. The language has been repeatedly modernized, most recently in a version certified as a public standard by the International Organization for Standardization (ISO) and the American National Standards Institute (ANSI) in 2002. That version includes support for most modern programming technology, including the ability to run multiple threads of a single application; support for Linux, Windows, Unix and other operating systems; and the ability to interconnect with software written using Internet standards HTML, XML, Sun Microsystems Inc.'s Java or Microsoft Corp.'s .Net.

Object-oriented Cobol is simply a set of compilers and rules that allow developers to create Cobol applications in modules that can trade or share functions, making it easier (sometimes) to change the applications once they're written.

Why haven't I ever heard of it? Because even most Cobol shops don't use it as a primary programming tool. Converting older Cobol code to object-oriented code would require more than just running it through a different compiler, according to freelance software architect and CobolReport.com columnist Martin Pagnan. Object-oriented applications require a different structure compared to the linear "do this, then do that" structure of most Cobol apps, which would require almost a total rewrite of the software, says Jonathan Eunice, principal analyst at consultancy Illuminata, Inc. in Nashua, N.H. "Cobol is incredibly structured. And retrofitting an object structure to it? Well, you can bolt an internal combustion engine to a camel, but I'm not sure what you'd get out of it."

So why should I care? If your company is of any size, you probably have Cobol code running right at the center of your technological nerve center. Anything you can do to update it, make it more available outside the mainframe environment, or tweak it to reflect new business rules will help. That's why so many lines of new Cobol code are written every year. Most of that new code, and much of the maintenance work, takes advantage of some object-oriented techniques, according to Edmund C. Arranga, editor of CobolReport and an independent writer and consultant.

So what's the downside? Cobol applications have always been expensive, and will continue to be. Most run on mainframes. Although it would be better if this software ran on cheaper servers, the cost of moving it is prohibitive. The number of skilled Cobol programmers is also shrinking and aging. But the Meta Group consulting firm predicts that 60% of mainframe applications will continue to reside on mainframes, which means that companies strapped for Cobol programming will have to rely on labor-saving tools and techniques like object-oriented Cobol to keep those old dogs running.

This article was originally published on 2004-05-13
eWeek eWeek

Have the latest technology news and resources emailed to you everyday.