Inmunidad diplomática

COBOL is a Computer programming language of third generation created in 1959. Its name is an acronym ( COmmon Business Oriented Language ) which reveals its original vocation: to be a common language for the programming of business applications. The standard COBOL 2002 supports in particular the directed Programmation object and other features of the modern computer programming languages.

Prehistory and specifications

The COBOL was initially created in 1959 by the Short Arranges Committee , one of the three committees proposed with a meeting with the Pentagone in May 1959 organized by Charles Phillips of the Department of Defense of the the United States. The committee was formed to recommend a short-term approach for a common language, independent of the manufacturers, for the business applications of the American administration. It was made up members representing six manufacturers of Ordinateur S and three government agencies. The six computer makers were Burroughs Corporation, IBM, Mineapolis-Honeywell, RCA, Sperry Rand, and Sylvania Electric Products. The three agencies of the government were the US Air Force , the David Taylor Model Basin , and the National institute of the standards . This committee was chaired by a member of the NBS. Committees in the medium and long term were also proposed with the Pentagon. On the other hand, even if first were founded, it forever be operational, and the last forever be founded. In the final analysis, a sub-committee of the Short Arranges Committee was formed with six members:
  • William Selden and Gertrude Tierney of IBM;
  • Howard Bromberg and Howard Discount of RCA;
  • Vernon Reeves and Jean E. Sammet of Sylvania Electric Products.

This sub-committee finished the specifications of COBOL at the end of 1959. They were largely inspired by the language FLOW-MATIC invented by Grace Hopper, called “ the mother of the language COBOL ”, and by language COMTRAN from IBM, invented by Bob Bemer.

(Based on: J.E. Sammet. " The Early History off Cobol." , in ACM SIGPLAN Notes, Volume 13, Issue 8 (August 1978) Special issue: History off programming languages conference, pp.121-161, 1978. Also published in History off Programming Languages, rk: ACM Monograph Series, 1981.)

History of the standards COBOL

These specifications were approved by the complete committee, then by the executive committee in January 1960 and were sent to the office of impression of the government which published them and printed by naming them COBOL 60. The language was developed in less than six months of work, and it is still of use forty years later, after several revisions standardized by the ANSI (American National Standards Institute), of which
  • COBOL-68 (1968)
  • COBOL-74 (1974)
  • COBOL-85 (1985) which testifies to a great step towards the adoption of the programming structured by computing industry
  • COBOL 2002 introduces the programming object, the support of the Unicode, XML, etc

Principal features

COBOL, like defined in the original specification, had excellent capacities of car-documentation, good methods of management of the files and exceptionally good types of data for the time, thanks to the use of the clause PICTURE to detail the format of a field. Like the majority of the other languages of the time, it did not make it possible to define local variables, recursive functions and to allocate memory dynamically.

The management of the decimals in COBOL (numbers in fixed point), and controls it round-offs and goings beyond, make it possible to avoid the many problems which would arrive while using numbers at Floating decimal point for financial calculations.

It also integrated a generator of reports/ratios, the procedures of tri and fusion and the communication. An optional module also allowed a form of Communication inter-process by file of messages.

The initial bias to define a computer programming language close to the natural language (as for FLOW-MATIC) was to facilitate, if not the programming, at least the audit of the programs COBOL by managers not-data processing specialists. This choice had as a consequence a complex syntax (the natural language is not simple), with many reserved words, and many options (the operations of management are not simple either) which are worth with COBOL a reputation of verbosity, which is not inevitably founded on facts.

For example in COBOL the instruction add Amount to Total-Day, Total-Month, Total-Year. would express itself, out of C or other languages derived, by TotalJour += Montant; TotalMois += Montant; TotalAnnee += Montant; who is not inevitably more clearly, and who is not shorter.

Like other languages of the time (for example FORTRAN 2), COBOL made it possible to modify code during the execution using the famous statement ALTER X TO PROCEED TO Y (to deteriorate X to go towards Y). This dangerous possibility, which transposed a standard technique of the programming in Machine language, was removed thereafter.

The successive versions of the standard modernized the language, for example by adding structures of control improved and the support of the programming object, while preserving to the maximum compatibility with the previous models, in order to avoid having to modify the enormous stock of programs COBOL in service.

The weight of the heritage

The language COBOL was by far the language more employed Années 1960 with 80, and remains always of use in major companies, in particular in the financial institutions which have a vast library of COBOL applications. Written at one time when the bytes were expensive, and where the year 2000 was still extremely far, these applications made fear the famous bug of the year 2000. It was feared indeed that by measurement of economy the programmers coded the years on 2 digits rather only 4. Actually, banks and other financial institutions which manage files for a very long time over 10,20 even 30 years (ready for examples) obviously did not await the journalistic hysteria of 1999 to deal with the problem.

In 2005, the Gartner Group estimated that 75% of the data of the business world were treated by programs in COBOL and that 15% of the new developed programs will be it in this language.

COBOL makes it possible to carry out accounting treatments because of its arithmetic capacities in Fixed point, in particular for the batch processings where it presents excellent performances, provided that calculations are very basic. But, even if the evolutions of COBOL today equipped it with some of the tools provided by the modern languages (recursivity, dynamic allocation, objects, etc), its use remains confined with the business applications.

Structure of a program in COBOL

A program comprises four divisions. Standard COBOL-85 makes compulsory only the first.

  • IDENTIFICATION DIVISION.
Contains general information on the program (of which the name).
  • ENVIRONMENT DIVISION.
Contient information on the environment (hardware and software) in which the program is carried out.
  • DATED DIVISION.
Contains descriptions of data (variable, files, parameters and sometimes description of screen).
  • PROCEDURE DIVISION.
Contains the description of the treatments carried out.

Each division is made up of “sections”, formed of “paragraphs” made up of “sentences” which can be imperative sentences or clauses.

The first six columns of each line of program are regarded as a zone of comment, being formerly used to number the perforated cards (in the event of fall of the package, it was enough to pass them on a sorter to reconstitute the correct version of the program). The seventh column contains a control character: space for the active lines, star for the comments.

The eighth column is the beginning of the titles of paragraphs.

The twelfth column is the beginning of the instructions.

The modern compilers COBOL allow the use of a free format which does not impose any more share-cropping. ----

Sample program (Hello!)

Writing in the typical style of the programs on perforated cards (years 1960-70), with numbered lines

000100 IDENTIFICATION DIVISION. 000200 PROGRAM-ID. SALUTTOUS. 000300 DATE-WRITTEN. 5/21/05 19:04. 000400 AUTHOR. 000500 ENVIRONMENT DIVISION. 000600 CONFIGURATION SECTION. 000700 SOURCE-COMPUTER. RM-COBOL. 000800 OBJECT-COMPUTER. RM-COBOL. 000900 001000 DIVISION DATED. 001100 FILES SECTION. 001200 100000 PROCEDURE DIVISION. 100100 100200 BEGINNING. 100300 DISPLAY " " LINE 1 POSITION 1 ERASE EOS. 100400 DISPLAY " HELLO! " LINE 15 POSITION 10. 100500 STOP RUN.

Note: ERASE EOS means " Erase End Off Screen". The order line 100300 thus causes to erase the screen.

Example in free format

Another version of the same example in free COBOL-85 format:

Identification division. Program-id. Hello. Procedure division. Display " Hello world! " line 15 position 10. Stop run.

See too

PACBASE, a CASE which generates COBOL.

External bonds

  • (Pt) COBOLware Services
  • (Fr) Forum COBOL the forum of mutual aid of the French-speaking users COBOL.
  • (Fr) Course a small course of COBOL 85.
  • (in) Open COBOL free compiler for Windows, Linux and Mac-OS X.
  • (in) COBOL To use Groups (COBUG)
  • (Fr) GCobol a Mini COBOL to begin under Windows and Linux.

Random links:Geoffroy de Lusignan | Kunming | Geneva (Iowa) | Leers-north | Shasou and Apirou in the Egyptian documents | Yonen Buzz