ORGIN AND HISTORY OF COBOL PROGRAMING LANGUAGE

COBOL ( common business-oriented language) is a compiled English-like computer programming language designed for business use. It is imperative, procedural and, since 2002, object-oriented. COBOL is primarily used in business, finance, and administrative systems for companies and governments. COBOL is still widely used in legacy applications deployed on mainframe computers, such as large-scale batch and transaction processing jobs. But due to its declining popularity and the retirement of experienced COBOL programmers, programs are being migrated to new platforms, rewritten in modern languages or replaced with software packages. Most programming in COBOL is now purely to maintain existing applications.

GRACE HOPPER
COBOL was designed in 1959 by CODASYL and was partly based on previous programming language design work by Grace Hopper, commonly referred to as "the (grand)mother of COBOL". It was created as part of a US Department of Defense effort to create a portable programming language for data processing. Intended as a stopgap, the Department of Defense promptly forced computer manufacturers to provide it, resulting in its widespread adoption.It was standardized in 1968 and has since been revised four times. Expansions include support for structured and object-oriented programming. The current standard is ISO/IEC 1989:2014.


                         COBOL has an English-like syntax, which was designed to be self-documenting and highly readable. However, it is verbose and uses over 300 reserved words. In contrast with modern, succinct syntax like y = x;, COBOL has a more English-like syntax (in this case, MOVE x TO y). COBOL code is split into four divisions (identification, environment, data and procedure) containing a rigid hierarchy of sections, paragraphs and sentences. Lacking a large standard library, the standard specifies 43 statements, 87 functions and just one class
 WHAT LEAD IT TO DEVELOPE
 
                                           
In the late 1950s, computer users and manufacturers were becoming concerned about the rising cost of programming. A 1959 survey had found that in any data processing installation, the programming cost US$800,000 on average and that translating programs to run on new hardware would cost $600,000. At a time when new programming languages were proliferating at an ever-increasing rate, the same survey suggested that if a common business-oriented language were used, conversion would be far cheaper and faster.

In April 1959, Mary K. Hawes called a meeting of representatives from academia, computer users, and manufacturers at the University of Pennsylvania to organize a formal meeting on common business languages. Representatives included Grace Hopper, inventor of the English-like data processing language FLOW-MATIC, Jean Sammet and Saul Gorn.
The group asked the Department of Defense (DoD) to sponsor an effort to create a common business language. The delegation impressed Charles A. Phillips, director of the Data System Research Staff at the DoD, who thought that they "thoroughly understood" the DoD's problems. The DoD operated 225 computers, had a further 175 on order and had spent over $200 million on implementing programs to run on them. Portable programs would save time, reduce costs and ease modernization.

CODE FORMAT

COBOL can be written in two formats: fixed (the default) or free. In fixed-format, code must be aligned to fit in certain areas. Until COBOL 2002, these were:
                                                                                                                                                              
NameColumn(s)Usage
Sequence number area1–6Originally used for card/line numbers, this area is ignored by the compiler
Indicator area7The following characters are allowed here:
  • * – Comment line
  • / – Comment line that will be printed on a new page of a source listing
  • - – Continuation line, where words or literals from the previous line are continued
  • D – Line enabled in debugging mode, which is otherwise ignored
Area A8–11This contains: DIVISION, SECTION and procedure headers; 01 and 77 level numbers and file/report descriptors
Area B12–72Any other code not allowed in Area A
Program name
area
73–Historically up to column 80 for punched cards, it is used to identify the program or sequence the card belongs to

                                                                                                                                                             






In COBOL 2002, Areas A and B were merged to form the program-text area, which now ends at an implementor-defined column.
COBOL 2002 also introduced free-format code. Free-format code can be placed in any column of the file, as in newer programming languages. Comments are specified using *>, which can be placed anywhere and can also be used in fixed-format source code. Continuation lines are not present, and the >>PAGE directive replaces the / indicator


DATA TYPES

Standard COBOL provides the following data types:


                                                                                                                                                            
Data typeSample declarationNotes
AlphabeticPIC A(30)May only contain letters or spaces
AlphanumericPIC X(30)May contain any characters
BooleanPIC 1 USAGE BITData stored in the form of 0s and 1s, as a binary number
IndexUSAGE INDEXUsed to reference table elements
NationalPIC N(30)Similar to alphanumeric, but using an extended character set, e.g. UTF-8
NumericPIC 9(5)V9(5)May contain only numbers
ObjectUSAGE OBJECT REFERENCEMay reference either an object or NULL
PointerUSAGE POINTER
                                                                                                                                                           






Type safety is variable in COBOL. Numeric data is converted between different representations and sizes silently and alphanumeric data can be placed in any data item that can be stored as a string, including numeric and group data.In contrast, object references and pointers may only be assigned from items of the same type and their values may be restricted to a certain type.


Comments

Popular posts from this blog

WHY COBOL LOSSED IT'S POPULARITY