COBOL
|
COBOL was developed by the Conference on Data Systems Languages
(CODASYL), convened in 1959 by the Department of Defense.
COBOL compilers became available in 1960, but they were not standardized.
The American National Standards Institute (ANSI) standardized a version
of COBOL in 1968.
The language was revised and updated by ANSI in 1974 and again in 1985.
These standards sometimes are called COBOL or COBOL-68, COBOL-74, or
COBOL-85. Most compilers are now COBOL-85 standard, but
there still are a few COBOL-74 versions out there.
A COBOL program always contains four
This book is written against the COBOL-85 standard, but you will have no trouble using a COBOL-74 compiler for any of the examples.
|
Approximately 90% of all COBOL code runs in a character-based
environment, which means that most COBOL screens are 80 columns wide
by 24 or 25 characters high and do not contain graphics.
Basic Hello Program in COBOL
Although there are versions of COBOL on the market that act in a Windows-like environment, this book is not intended to be a course in COBOL for Windows. This means that throughout the book, you will be running or executing your programs on an MS-DOS computer or in an MS-DOS window that has been opened on a Windows computer. The MS-DOS window is an 80 x 24 character window and represents the kind of display that you might see when coding COBOL on a mainframe or minicomputer.
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. HELLO. 000300 ENVIRONMENT DIVISION. 000400 DATA DIVISION. 000500 PROCEDURE DIVISION. 000600 000700 PROGRAM-BEGIN. 000800 DISPLAY "Hello world". 000900 001000 PROGRAM-DONE. 001100 STOP RUN. |

