Skip to content

READY/RESET TRACE Statements

The READY/RESET TRACE statements enable paragraph tracing in a program compiled with the -fready-trace compiler flag.

General Format:

       READY TRACE 
       . . . 
       RESET TRACE

General Rules:

  1. The READY TRACE and RESET TRACE statements enable paragraph tracing and are otherwise ignored in the execution of the program.
  2. Paragraphs/Sections entered in the interval between the READY TRACE and RESET TRACE statement are traced by writing output to the console in the form:

    PROGRAM-ID: [program-id]: [paragraph name]

    In the example below:
       PROGRAM-ID: READYTRACE: INITIALIZATIONS
       PROGRAM-ID: READYTRACE: MAIN-BODY

Code Sample:

       IDENTIFICATION DIVISION. 
       PROGRAM-ID. READYTRACE. 
       ENVIRONMENT DIVISION. 
       DATA DIVISION. 
       WORKING-STORAGE SECTION. 
       PROCEDURE DIVISION. 
       MAIN. 
              READY TRACE. 
              PERFORM INITIALIZATIONS. 
              PERFORM MAIN-BODY. 
              RESET TRACE. 
              STOP RUN. 
              .
Back to top