PRAGMA Statement
The PRAGMA statement provides internal compiler control, for profiling. The first literal is the command sent to the compiler.
Format 1
PRAGMA “PROFILING” { literal-1 } ...
Format 2
PRAGMA “DUMP” { literal-1 } ...
Syntax:
literal-n is a character string.
General Rules:
- The
PRAGMA “PROFILING”statement causes programs compiled with-fprofilingto report time measurements from the currentPRAGMAstatement to the nextPRAGMA, or to the end of the program. - The
PRAGMA “PROFILING”statement should be entered in column 8, as in the Code Sample below. - The
PRAGMA “DUMP”statement causes a profiling report to be generated when executed. Profiling reports produced by thePRAGMA “DUMP”statement will overwrite previousPRAGMA “DUMP”files with the same name.
PRAGMA “PROFILING” Code Sample:
PROCEDURE DIVISION.
. . .
PRAGMA "PROFILING" "STEP1".
. . .
PRAGMA "PROFILING" "STEP2".
PRAGMA “DUMP” Code Sample:
PROCEDURE DIVISION.
. . .
PRAGMA "DUMP" "REPORT".
. . .