COBOL Manual for TNS and TNS/R Programs

Compiler Directives
HP COBOL Manual for TNS and TNS/R Programs522555-006
36-47
TRAP2 and NOTRAP2
TRAP2 and NOTRAP2
Note. The NMCOBOL compiler, which has traps set by default, ignores these directives and
issues warnings.
Use the NOTRAP2 directive only during the process of conversion from COBOL 74 to
HP COBOL. It is provided to enable programs that do not include SIZE ERROR phrases to be
compiled and executed in HP COBOL without investing programmer time in analyzing the
potential for overflow problems. The availability of this directive might be discontinued after a
period of time.
Default: TRAP2
Placement: Anywhere
Scope: The last TRAP2 or NOTRAP2 before the END PROGRAM statement for
the outermost program applies to the entire separately compiled
program (the outermost program of a compilation and any programs
contained within it).
Dependencies: NOTRAP2-74 overrides TRAP2.
References: TRAP2-74 and NOTRAP2-74
TRAP2
NOTRAP2
VST328.vsd