SKIP Statement


Tip! SKIP* statements are active when listing the COBOL source code and have no impact while displaying the actual source code.

SKIP1, SKIP2, or SKIP3 statements specify the number of blank lines that should replace the SKIP statements while listing the COBOL source code. These statements are compiler-directive statements and do not affect the compilation and execution of the program.

These statements can be written in either Area-A or Area-B. These statements can code only one statement per line.

Syntax -

 SKIP1[.]
 SKIP2[.]
 SKIP3[.]
Note! All statements coded in [ ] are optional.

Parameters -

  • SKIP1 - Inserts a single blank line in the source listing.
  • SKIP2 - Inserts two blank lines in the source listing.
  • SKIP3 - Inserts three blank lines in the source listing.

Examples -


Scenario - Coding SKIP1 statement in COBOL program.

Code -

----+----1----+----2----+----3----+----4----+----5----
       01 EMP-REC.
          COPY EMPREC.
		  SKIP1.
		  
	   01 WS-VAR.
	      05 WS-INPUT1        PIC X(10).

Explaining Example -

  • SKIP1 statement won't display in the program listing.
  • SKIP1 inserts one blank line before WS-VAR declaration line in the program listing.