Disable Debugging Lines Example


Scenario - Disabling debugging lines.

Code -

----+----1----+----2----+----3----+----4----+----5----+
       IDENTIFICATION DIVISION.
       PROGRAM-ID. DISDEBUG.
       AUTHOR. MTH.

       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
      *SOURCE-COMPUTER. IBM3278 WITH DEBUGGING MODE.
       SOURCE-COMPUTER. IBM3278.
	   OBJECT-COMPUTER. IBM3278.

       PROCEDURE DIVISION.
 
      D    DISPLAY "DEBUGGING LINE".
           DISPLAY "NORMAL LINE".
           STOP RUN.

Output -

NORMAL LINE

Explaining Example -

In the above example:

  • WITH DEBUGGING MODE - is not coded with the SOURCE-COMPUTER, and the compiler considers all the debugging lines as comments. So, only "NORMAL LINE" is displayed in the output.