CIS133C - Organization of COBOL programs

The COBOL program is coded on an 80-character line. Columns 1-6 are reserved for sequence numbers. Column 7 is an indicator area where an asterisk (*) tells the computer to disregard the remainder of the line and a slash (/) will have the printer go to a new page before printing the line and a hyphen (-) is used to continue a line. Columns 8-72 will contain your code: Area A is 8-11 and Area B is 12-72. Columns 73-80 is an identification area for the program name and you should not code here as the computer will ignore it.

  1. IDENTIFICATION DIVISION documents the program and contains the following . . .
    PROGRAM-ID.(Required)  Program name is a single-word of up to 30 characters. 
    AUTHOR.                Your name goes here.
    DATE-WRITTEN.          Enter the date written.
    DATE-COMPILED.         The date is provided automatically by the compiler.
    INSTALLATION.          This indicated where the program was written.
    SECURITY.              The password needed to run the program.
    REMARKS.               Program description and any comments pertaining to
                           maintenance or error codes or whatever.
    
  2. ENVIRONMENT DIVISION
    CONFIGURATION SECTION is optional and specifies the computer hardware.
    INPUT-OUTPUT SECTION briefly describes every data file . . .
    SELECT statement gives the name of the file and is the name by which the program refers to the file.
    ASSIGN statement provides an implementor name of each input/output defice for the file(s); it is the name for the operating system to refer to the physical file(s).


  3. DATA DIVISION
    FILE SECTION defines all files of the INPUT-OUTPUT SECTION.
    WORKING-STORAGE SECTION describes the memory area where data fields are kept, the contents of which will be changed by program processing but the description of which will not change.


  4. PROCEDURE DIVISION
    The 'heart' of the program describing the step-by-step procedure for the computer to follow to solve the problem.




TOP OF
PAGE

HOME
PAGE

CLASS
WORK


AS400
PAGE

COBOL
BOOKS

COBOL
NOTES

COBOL
LINKS

HOME
EMAIL

WORK
EMAIL

1