Coding Sheet

During the initial days of COBOL development, COBOL programs are punched on a card and loaded into the punch card reader. The punch card reader reads the code from the card and loads it as a program. From there, the program compilation and execution are taken care of. The code identification process using a card reader needed a standard structure that should be the same for everyone. The standard structure designed to punch the programs is called COBOL Coding sheet.

What is Coding Sheet?

The COBOL coding sheet is a structure to identify from where each statement coding should start and how it differentiates from other statements.

Nowadays, COBOL editors are used for coding programs. However, the same coding sheet is used as a standard and the developers have to follow these guidelines while coding the programs.

The COBOL Coding sheet is also called as COBOL reference sheet. The coding sheet contains 80 columns for each line/row. The below diagram shows the IBM coding sheet -

COBOL Punched Card

Coding Sheet Split

The below diagram shows the coding sheet row split up at each column level -

Coding sheet

On coding forms,

Columns Description
1 - 6 Sequence number area
7 Indicator area.
8 - 11 Area A.
12 - 72 Area B
73 - 80 System-generated number area.

1-6 Columns (Sequence Number Area) -

  • The first six columns are reserved for the sequence number.
  • The sequence number value can be a combination of any valid character.
  • The sequence number automatically gets increased with every addition of a new line.

The sequence number area is divided into two parts -

  • Page Number(1-3 Columns) - Represents the current page number.
  • Line Number(4-6 Columns) - Represents the current line number on the page.

For example -

Codingsheet program Code

In real-time, developers use these columns to label the code for a project or defect. Due to this, the area is also called Tag Area. For example - P67328, D31456, etc.

Tip! To automatically add the sequence number to the COBOL program, execute the command below in the code editor.

7th Column (Indicator Area) -

Reserved for special characters. The special symbols are -

Special Character Description
* Comment indicator . If "*" is coded, the COBOL compiler considers that line as a comment.

For example -
- Continuation indicator . If "-" is coded, the COBOL compiler understands that the current line is a continuation of the previous line.

For example -
       01 WS-VAR           PIC X(50) VALUE "MULTILINE 
/ Print stopper indicator. If "/" is coded, it specifies that the printing should start from the new page.

For example -
D Debugging indicator . If the "D" is coded, the COBOL compiler understands that line is used for DEBUGGING purposes.

The debugging line is enabled when WITH DEBUGGING MODE is enabled like below.
For example -
In all other cases, the line considers as a comment or dummy line.

8-11 Columns (Area-A) -

  • Columns 8 to 11 are called as Area-A.
  • All DIVISION names, SECTION names, system-defined paragraph names, user-defined PARAGRAPH names, Level numbers (01, 77), DECLARATIVES, END DECLARATIVES, and FD/SD entries coding should start in Area-A.

12-72 Columns (Area B) -

  • Columns from 12 to 72 are called as Area-B.
  • Apart from the above specified in Area-A, all other statements should start in Area-B.
  • All entries, sentences, statements, clauses, and continuous lines should code in Area-B.

For example -

Codingsheet program Code

Objects can written in both Area-A and Area-B -

The below objects can begin in either Area-A or Area-B -

  • Level Numbers from 02 to 49, 66, 88.
  • Comments coded with IDENTIFICATION DIVISION.
  • Floating comments.
  • Compiler-directive statements EJECT, SKIP1, SKIP2, SKIP3, etc.
  • Debugging lines.
  • Blank lines. An empty line can be anywhere in a program.

73-80 Columns (System Generated Number) -

  • Columns from 73 to 80 are reserved for System Generated Numbers and used for identification purposes.
  • COBOL Compiler does not consider these columns as a part of the code.
Codingsheet program Code