Cobol: perception and reality
Transcript of Cobol: perception and reality
![Page 1: Cobol: perception and reality](https://reader031.fdocuments.in/reader031/viewer/2022020313/575076811a28abdd2e9ee32e/html5/thumbnails/1.jpg)
126 Computer
You can almost feel the weight ofheavy machinery grinding in thebackground and the chill of theroom, cooled to 55 degrees tokeep the beast happy. Hunkered
down under fluorescent lights, a team ofprogrammers once again studies the greenprintouts that hold the clues to what ispreventing the accounting system fromproperly calculating overtime pay. Theclatter and whoosh of a keypunchmachine adds to the din. Cables as thickas a man’s wrist snake down the hallway,making navigation difficult, especially foranyone with a box of cards in one handand a cup of hot coffee in the other.Finally, success! The source of the error isfound: a continuation character placed inthe wrong column and a missing period.Fortunately, the weary programmers willnot have to miss all the New Year’s Evefestivities; there are still two hours untilthe ball in Times Square ushers in 1962.
Long associated with green screens,core dumps, batch processing, and carddecks, Cobol is perceived through the fil-ter of data-processing history. Machineand language become intertwined. Timestands still. Technology, astonishingly,grinds to a halt. A person’s perceptionsof Cobol date them like the rings of atree. Listening to a salesperson, a man-ager, a programmer, or a self-ordainedguru can reveal deep-rooted, hiddenassumptions. Which ring of Cobol’sdevelopment era has captured you: 1962,1968, 1974, 1985, or 1998? Or inmachine time: the IBM 702/704/360, the
PDP 9/11, the Altair/Apple, Wintel, orthe Web (the universal machine)?
This column lists the perceptions wehave uncovered and counters them withthe reality of Cobol.
PERCEPTIONCobol is a mainframe language.
REALITYAt first glance, Cobol’s traditional
mainframe connections may seemstrangely at odds with the push-buttonGUIs and integrated software develop-ment environments of the PC and workstation worlds. This perceivedincongruity, however, is more a reflectionof the mainframe’s inability to keep pacewith innovations than a reflection ofCobol’s innate possibilities.
Cobol has been available on PCsalmost since their inception. Ryan-McFarland ported Cobol to a Z-80 chipin the early ’80s. Micro Focus, a leader inporting Cobol from mainframes to alter-native platforms, has offered Cobol onPCs and Unix machines for almost 20years. PC-based Cobol tools are so effec-tive they are often used to rehost main-frame applications. Yesterday’s Cobolcompilers have given way to powerful,highly extensible environments that rivalthe best of any language: IBM, ComputerAssociates, Fujitsu, Hitachi, AcuCobol,Liant, Micro Focus, and other vendorsoffer state-of-the-art, GUI-based, Coboldevelopment environments.
When people talk about the billions of
lines of legacy Cobol code that exist, theyimply that it all resides on mainframes.Keep in mind that the “legacy” in legacycode refers to any code in productiontoday—it does not specify a platform ora language—and legacy is good; it means“something to learn from.” The reality ismuch different. Industry experts estimatethat more than 25 percent of the 180- billion-plus lines of legacy Cobol codereside on a PC or a Unix machine. Theinstalled base of Cobol code grows atabout five billion lines a year, and themajority of this code is written for PCsand Unix machines. A 1995 Dataqueststudy showed Cobol for Windowsmachines growing at a rate of 75 percent.
PERCEPTIONCobol stopped evolving in the 1970s,
stopped growing in popularity in the1980s, and stopped being used to
develop client-server and Web-basedapplications (if it ever was) in the 1990s.
REALITYSince its introduction in 1960, Cobol
has continued to evolve, in order toremain the programming language forbusiness. Adoption of the new standardby the American National StandardsInstitute and the International Organi-zation for Standardization, expected in1998, will establish Cobol as the language with the longest history of stan-dardized updates. The 1985 Cobol stan-dard and 1989 addendum incorporatedmany software-engineering principles ofthe day, including information hiding,localization, and the ability to defineloosely coupled, highly cohesive modules.
Cobol 1998 introduces more changesthan all the previous Cobol standardscombined. On the procedural sidealone, Cobol 1998 will add
Cobol:Perceptionand Reality
Edmund C. Arranga, The Cobol GroupFrank P. Coyle, Southern Methodist University
Ob
jec
tTe
ch
no
log
yEditor: Bertrand Meyer, EiffelSoft, 270 Storke Rd., Ste. 7, Goleta, CA 93117; voice (805) 685-6869; [email protected]
Long associated with green screens, core dumps, batch
processing, and card decks,
Cobol is perceived through the filter of
data-processing history.
.
![Page 2: Cobol: perception and reality](https://reader031.fdocuments.in/reader031/viewer/2022020313/575076811a28abdd2e9ee32e/html5/thumbnails/2.jpg)
March 1997 127
• bit and Boolean data types and theirassociated algebraic operations(AND, OR, XOR, NOT);
• pointer data with allocate andfree statements to manage storage;
• dynamic tables that grow automat-ically;
• user-defined functions;• Year 2000 intrinsic functions,
among others;• file sharing and record locking;• recursion;• index-name qualification (used in
the same manner as data and con-dition-names);
• elimination of the picture clauserequirement in the definition of lit-eral strings;
• inline comments;• a return parameter for subroutine
calls;• free-form source code that removes
column restrictions;• standard IEEE arithmetic;• common exception processing;• international support (locally
defined collating sequences, mone-tary formats, and date and timevariations);
• a validate statement, to auto-matically validate data based on itsdescription; and
• improved interoperability withother languages.
A 1995-96 study conducted by SentryMarket Research found Cobol to be theonly language rated more positivelytoday than in 1993. A 1995 GartnerGroup study found that 65 percent of all new, mission-critical applications,regardless of platform, are currentlywritten in Cobol. And a 1996 SentryMarket Research study found Cobol tobe the number two language for devel-oping client-server applications, com-manding 21 percent of the marketbehind only Visual Basic’s 23 percent.
The Internet, intranets, and extranetshave changed the computing landscape.To develop applications for the Web,many companies thought they needed toresort to languages like Perl and Awk tocode the CGI (Common GatewayInterface) connection. They thought theyhad to master the details of the CGI spec-
ification and a cryptic language to deci-pher the incoming data streams. Thereality is that Cobol can be the CGI lan-guage for developing Web-based serverapplications.
Micro Focus’ Visual Object Coboland NetExpress extend the capabilitiesof Cobol’s accept and displaystatements to receive and presentHTML name/value pairs. To Cobol,HTTP data is simply another stream ofdata. Cobol programs can work withform data, and retrieve and send datausing declared environment variables.Parsing and deciphering is no longerpart of the business programming
equation—it is accomplished behindthe scenes, where it belongs. Expectmost Cobol vendors to implement thismodel and offer similar capabilitiesbefore the year’s end.
The ability to use Cobol as the CGIprogram is tremendously valuable.Legacy code that uses accept and dis-play is almost immediately Web-enabled, scaling up to a potentiallylimitless user base overnight. Cobol asthe interface language relieves managerswho no longer need to risk deploying Perlscripts of questionable security. Cobol asthe gatekeeper brings the power ofCobol’s preeminent data-manipulationfeatures into play; allows the gatewayprogram to talk to other programs, data-bases, and transaction monitors; andleverages existing Cobol skills.
PERCEPTIONCobol is not an object-oriented lan-
guage.
REALITYCobol has objects galore. OOCobol
supports typed, untyped, dynamic, sta-tic, persistent, simple, temporary, factory
(class), system, and exception objects, aswell as Binary Large Objects (Blobs).The 1998 standard introduces OO con-structs to Cobol, but they are already ofsuch vital importance that many of theleading language vendors—includingIBM, Hitachi, and Micro Focus—cur-rently offer OOCobol compilers, inmuch the same way C++ vendors offercompilers before the language is stan-dardized.
The effort to craft an OO Cobol hasbenefited from the pioneers in OO lan-guages. Smalltalk, C++, and Eiffel haveall been major influences on Cobol’s newlook. However, OOCobol is neither anew concept nor one that has been devel-oped for the sake of fashion. The objectpart of OOCobol has been in develop-ment since November 1989, when theCodasyl Cobol committee met to discusshow to best objectify Cobol. OO andCobol experts attended the meeting andconcluded that Cobol was an excellentvehicle for bringing OO programmingto the world of business. Manyrenowned OO experts, including BradCox and Ian Graham, heartily endorsedthe appearance of OOCobol.
OOCobol is, in fact, in many ways amore powerful and capable object-ori-ented programming language than manyof its contemporaries. Important featuresof the language include
• classes, which contain factory andobject definitions;
• factory objects, which contain dataand methods;
• object instances, which contain dataand methods;
• language constructs reuses (forclass reuse), interface (to pre-sent different hierarchical inter-faces), and prototype (for rapidapplication development);
• multiple and single inheritance;• polymorphism;• automatic garbage collection;• data items as objects;• complete compatibility with previ-
ous Cobol standards;• named objects that may be retrieved
in subsequent application executions;• a class library;• parameterized classes;
OOCobol is, in many ways,a more powerful and
capable object-orientedprogramming language
than many of its contemporaries.
.
![Page 3: Cobol: perception and reality](https://reader031.fdocuments.in/reader031/viewer/2022020313/575076811a28abdd2e9ee32e/html5/thumbnails/3.jpg)
• object handles (as opposed to object pointers) to safeguardencapsulation; and
• collection classes.
On the practical side, the learning curve for OOCobol is sig-nificantly less than for other OO languages. Cobol programmerscan become good OOCobol programmers in as little as 12 weeks.Contrast this with the steep learning curve of 40-plus weeks forSmalltalk or 80-plus weeks for C++ and then ask yourself, as aCIO, which you would prefer.
Many businesses have already selected OOCobol as their lan-guage of the future. Quality Hi-Tech Services, Atlanta, devel-oped an Internet, client-customized, order processing andpurchasing system using OOCobol. Weincor, Inc., WindsorLocks, Connecticut, uses OOCobol with other OO languagesto build health-care management systems. Volvo Data usesOOCobol to create client-server systems across a variety of plat-forms.
OOCobol is taught or will be taught at more than 100 uni-versities within the next 12 months. The University of Nebraskaat Omaha, Cal State Hayward, and Penn State’s College ofTechnology will be introducing OOCobol into their curriculain the near future. Beyond straightforward language instruction,OOCobol will be incorporated into courses addressing issuesrelated to electronic commerce and the Internet and business.
P erception matters. But so does reality. The reality is thatCobol, above all other languages, keeps the informationfurnaces of business burning brightly. Imagine:
The clock continues to wind inexorably toward the appointed hour.Linda scans the code one more time, assuring herself that all is well.
Midnight might be the witching hour at some locations; here it’sjust plain quiet. All that carpeting. A minute to compile, anotherminute or so to move the job to production, and then the conver-sion to capture and store the century as part of the date fields willbe complete. More than 1,200 modules, more than 20 million linesof code converted over the past two years. Many of the originalmodules have evolved into class definitions and the data distrib-uted across collections and object-aware databases. The companycertainly has gotten its money’s worth out of this code. Written in1962, maintained on a less than regular basis, but still readable—as well-crafted Cobol is known to be. Linda calculates the systemhas been run more than 250,000 times. Available on the companyserver as part of the corporate Intranet and extranet, who knowshow many more times it will run over the next 40 years. The com-pile completed, one more click...done. Just enough time to get hometo enjoy the turn of the century with family and friends. The clockstrikes midnight. The scheduling software silently cycles throughits inventory of requests, finds the program, and starts it. The CPUfetches and decodes the first operation. In a little more than an hourthe program will be done. A million reads, 20,000 writes, 50 reportsproduced, 100,000 invoices generated, and the company databaseupdated, safe and secure.
Cobol is off and running in the twenty-first century. ❖
Edmund C. Arranga and Frank P. Coyle are the coauthorsof Object-Oriented Cobol (SIGS Books, 1996). Arranga is themanaging editor of the Cobol Report and a partner in theCobol Group, an OO training and consulting company. Con-tact him at earranga@ objectz.com. Coyle is the director ofthe graduate program in software engineering at SouthernMethodist University. Contact him at coyle@seas. smu.edu.
COMING SOONTo an e-mail address near you.
Join our online focus group and help us improve Computer. To participate, send an e-mail to [email protected] or fill out the form
at http://computer.org/surveys/index.htm.
Innovative technology for computer professionals
MEMBER
IEEE COMPUTER SOCIETY®
®THE INSTITUTE OF ELECTRICAL AND ELECTRONICS ENGINEERS, INC.
.