COBOL/400 Language Help


COBOL Source Program

Description
A COBOL source program is a syntactically correct set of COBOL statements.

With the exception of the COPY statement, the statements, entries, paragraphs, and sections of a COBOL source program are grouped into four divisions: the Identification, Environment, Data, and Procedure Divisions. The end of a COBOL source program is indicated by the absence of additional source program lines.

Here is the format for a separately compiled COBOL source program:

->->--*--IDENTIFICATION DIVISION. --*--------------------------->
    *--ID DIVISION. --------------*
 
->--PROGRAM-ID. program-name.---------------------------------->
 
->--*-----------------------------------*---------------------->
   *--identification-division-content--*
 
->--*------------------------------------------------------*--->
   *--ENVIRONMENT DIVISION. environment-division-content--*
 
->--*----------------------------------------*----------------->
   *--DATA DIVISION. data-division-content--*
 
->--*--------------------------------------------------*-------><-
   *--PROCEDURE DIVISION. procedure-division-content--*


[ Top of Page | Previous Page | Next Page | Table of Contents ]