COBOL is a very wordy language. Although mathematical expressions can also be written like other programming languages (see example below), its verbose mode is very readable for a novice. For example, multiply hourly-rate by hours-worked giving gross-pay is self-explanatory. COBOL is structured into the following divisions:
Division Name Contains IDENTIFICATION Program identification. ENVIRONMENT Types of computers used. DATA Buffers, constants, work areas. PROCEDURE The processing (program logic).
The following COBOL example converts a Fahrenheit number to Celsius. To keep the example simple, it performs the operation on the operator's terminal rather than a user terminal.
IDENTIFICATION DIVISION. PROGRAM-ID. EXAMPLE. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. IBM-370. OBJECT-COMPUTER. IBM-370. DATA DIVISION. WORKING-STORAGE SECTION. 77 FAHR PICTURE 999. 77 CENT PICTURE 999. PROCEDURE DIVISION. DISPLAY 'Enter Fahrenheit ' UPON CONSOLE. ACCEPT FAHR FROM CONSOLE. COMPUTE CENT = (FAHR- 32) * 5 / 9. DISPLAY 'Celsius is ' CENT UPON CONSOLE. GOBACK.
IBM COBOLs
In 1994, IBM dropped support of OS/VS COBOL, which conforms to ANSI 68 and ANSI 74 standards and limits a program's address space to 16 bits. IBM's VS COBOL II (1984) and COBOL/370 (1991) conform to ANSI 85 standards and provide 31-bit addressing, which allows programs to run "above the line."
COBOL/370 is more compliant with AD/Cycle, has more string, math and date functions, including four-digit years, allows development through a PC window and provides enhanced runtime facilities.
![]() | Reproduced with permission from Computer Desktop Encyclopedia. Copyright (c) 1981-2008 The Computer Language Company Inc. All rights reserved. |
Additional Resources
- Helpdesks and productivity
- Helpdesks and productivityGood start, and then...You lost it.1980 CalledThey want their mainframes back. :DWhy don't you explain your present value...calculation. Do you even know what present value means? What time period are we talking?Huh?You imply that on a Sun Ray platform the only problems are the applications or how they...
- Discussion threads 2008-07-03
- What programming language should we teach?
- What programming language should we teach?Re: What programming language should we teach?How about Javascript? No, seriously... it's free, it's cross-platform, it's already available on virtually ANY computer without needing to install anything at all, it's not terribly complicated, and it greatly resembles many of the other languages in use.When it...
- Discussion threads 2008-06-27
- From CFrom Chapter one: Data Processing and the IBM Mainframe
- From CFrom Chapter one: Data Processing and the IBM MainframeDitch all this Cr@p!They need to simply go with Vista Server and MS Access 2008 Server! Problem solved!http://fakesteveballmer.blogspot.comRE: From CFrom Chapter one: Data Processing and the IBM MainframePlease bear in mind that the 360 came out ten years before the ideas...
- Discussion threads 2008-06-20
- From Chapter one: Data Processing and the IBM Mainframe
- COBOL reflects 1920s data processing methods - and because the IBM 360 implemented COBOL it became the foundation for an entire worldview - a culture founded entirely on a refusal to adapt to external change: in technology, in the mission, in anything. by Paul Murphy
- Blog posts 2008-06-20
- From Chapter one: Data Processing and the IBM Mainframe
- From Chapter one: Data Processing and the IBM Mainframeumm, good pointI'll change it to electro-mechanical.Thanks!possible error?[i]It was the first successful system designed “from the ground up” to advance automated data processing by replacing the physical cards and associated electro-mechanical gear with purely digital processing and magnetic tape or disk storage,...
- Discussion threads 2008-06-13
- Linuxworksbetter.org: A humble proposal
- Linuxworksbetter.org: A humble proposalQuestion...You don't clarify who's paying the fee. Would people present themselves, or what?Anyway, I struggling to ignore the fairly major ethical questions.I hope I missed the pointi cannot believe that you would equate the horror of having a loved one or family member trapped in a radical...
- Discussion threads 2008-06-12
- Code Line Counter (exe)
- Code Line Counter is a software to count lines of code (SLOC, LOC) in source or text files for Project Managers. Able to count C, C++, C#, Java, Delphi/Pascal, COBOL, VB, PHP, ASP, XML, Perl, Fortran, SQL Script and so on. Includes total counts and percentages for comments, blanks and...
- Software downloads 2008-06-12
- BIt: From Chapter one: Data Processing and the IBM Mainframe
- BIt: From Chapter one: Data Processing and the IBM MainframeReading this gives me the shakes......by bringing back my days at the Chubb Institute in 1991, learning BASIC, OS JCL & COBOL. MANY hours of flow charting...WITH PENCIL & PAPER...and many more hours at a terminal trying to get what I...
- Discussion threads 2008-06-06
- BIt: From Chapter one: Data Processing and the IBM Mainframe
- From Chapter one: Data Processing and the IBM Mainframe This is the 4th excerpt from the second book in the Defen series: BIT: Business Information Technology: Foundations, Infrastructure, and Culture Note that the section this is taken from, on the evolution of...
- Blog posts 2008-06-06
- From BIT Chapter one: Data Processing and the IBM Mainframe
- From BIT Chapter one: Data Processing and the IBM MainframeContextThe reason COBOL still does most of the work today is because it has handled, is handling, and will handle simple tasks effectively on software that already exists and has been creepingly adapted to current circumstances.(You wouldn't want to quote that...
- Discussion threads 2008-05-23
- Buying from the enemy
- Last week zdnet bloggers Richard Koman and Michael Krigsman independently responded to the news that the FBI has been pursuing a major criminal investigation into the sale of counterfeit IT components - particularly Cisco routers. As part of his report Krigsman...
- Blog posts 2008-05-17
- Sometimes it takes a thousand words
- Once upon a time... I spent about three months working nearly full time with five juniors putting together a set of interlocking business process and applications models for a client. The results were beautiful: three fat binders filled with wonderfully clear IEW drawings lovingly printed on a QMS Color laser...
- Blog posts 2008-05-06
- RPG, PHP, and history
- While thinking through some of the comments recorded here as part of our discussion of development languages and environments I finally figured out what PHP reminds me of: RPG. RPG [Report generator] started out in the IBM 360 world as a report formatting aid, but never really...
- Blog posts 2008-04-28
- Is OOP a branch to nowhere?
- Is OOP a branch to nowhere?I agreeAnd furthermore, it is not self-evident that OOP is inherently more efficient than procedural programming.Your decomposition implies that even the earliest OO concepts existed only as transitional elements in large complex procedural workspace.At a machine-language level OO creates massive stack manipulations for even the...
- Discussion threads 2008-04-20
- Is OOP a branch to nowhere?
- To continue the discussion about development languages, I want to ask a potentially embarrassing question: has the whole object orientation business been both a functional and a conceptual failure? One of the odd things about the OO movement is that no two proponents understand...
- Blog posts 2008-04-20
- Frustrations with development languages
- Last week's discussions of Java suggested to me that most of the response people have to programming language choices is driven first by the lack of real choices and secondly by issues of scale and perception. Setting aside embedded uses of Java, I get the clear impression...
- Blog posts 2008-04-14
- HP: Cloud computing will cut 'dull' IT jobs
- HP: Cloud computing will cut 'dull' IT jobsDo you trust your data to China, Russia or Malaysiayou better...Like it not -I agree with the HP assessment. Evolving roles in the tech community are constantly changing. Change with them or move on to something else - whining/griping about it will not...
- Discussion threads 2008-04-08
- Eclipse launches super run-time project as alternative to Java and .NET
- Eclipse launches super run-time project as alternative to Java and .NETEquinox is a great ideea...but I'm wondering if Eclipse has the resources to pull it off. Afterall $un and M$ invested billions before their runtime became usable and accepted.No one trusts IBM...Eclipse has lost the trust of the community at...
- Discussion threads 2008-03-17
- 13 reasons IT hates metrics
- 13 reasons IT hates metricsYou Missed the Most Important Point...Management likes metrics because numbers on paper or PowerPointless makes it appear that they know what they're talking about, are meeting "goals" and showing "improvement". Unfortunately, IT metrics don't really measure anything meaningful. Take "Lines of Code" for example. On the...
- Discussion threads 2008-03-10
- Apple and Business -- Is it 25 Years Too Late?
- Apple and Business -- Is it 25 Years Too Late?I generally agreeI have always said that Apple makes a mighty fine piece of hardware for those that find Apple provides everything they want. They look slick, run slick and they are a secure platform. But Apple computers still...
- Discussion threads 2008-03-07
Neighboring Terms
Premier Vendor Content Whitepapers, webcasts & resources from our Power Center Sponsors
- Hardware Assisted Virtualization to Mitigate Security Risks
-
In this podcast Intel's Malcolm Harkins and HP's Manny Novoa chat about the latest issues in security technologies, notably the emergence of hardware assisted virtualization.
- Watch the Podcast on the Intel Open Port General Blog >>
- The Cisco Mobility Resource Center is your source for FREE mobility solutions
-
The Cisco Mobility Resource Center offers FREE videos, downloads, podcasts and more, all designed to help small and medium businesses get mobile connectivity solutions, improve productivity and drive sales and revenue.
- New mobility solutions at the Cisco Mobility Resource Center
- BNET Industries
- Check out BNET's newest resource for managers and executives. Need to do research on your competitors? Don't have time to read every trade pub? BNET Industries is the new source for daily news, insights, and research on 11 major industries and 9,000 public companies.
-
- The technology industry from a different angle
-
- See what's hot in the auto industry
-
- Stay on top of the energy industry





