In COBOL program coding starts at position 8 and up to 72nd position. Given here the 7th column in COBOL you can use it for five different uses.
There are two areas in COBOL you need to focus. One is Margin A and the other one is Margin B.
It starts from position 8. Usually entries of DIVISION and Para name starts from column 8.
We code all procedure division statements, and all other sentences at position 12.
Importance of 7th Column
- ‘*’ this will be used to give comments. Compiler ignores this line.
- ‘/’ this is the instruction to compiler. When you want to print the program, the code will move to next page. In real-time projects many people are giving at the end of the para-just for coding clarity.
- ‘-‘ Hyphen is used for continuation lines. That means you can continue a string into next line. See the below example how you can use hyphen ‘-‘ in 7th column.
^^^^^^ move 'aaaaaaaaaaaaaaaaaabbbbbbbbbbbbbaaaaaa ^^^^^^- 'cccccccccccccccc' to variable_name
- Sequence numbers 1-6: It is optional. In some projects giving sequence number in their COBOL code. But in some projects it is not mandatory.
- ‘D’ we code it at 7th position for debugging purpose. But,this will anyway be ignored by compiler. The usage you can see when you use debugging tools.