COBOL Manual for TNS and TNS/R Programs

Program Compilation
HP COBOL Manual for TNS and TNS/R Programs522555-006
11-132
TANDEM
TANDEM
TANDEM
specifies that subsequent source text is in Tandem reference format, which is
described in Reference Format for Source Program Lines.
ANSI
specifies that subsequent source text is in ANSI reference format, which is
described in Section 16, ANSI Reference Format.
TRAP2 and NOTRAP2
TRAP2
specifies that the compiler expects the operating environment to trap arithmetic
overflow (trap 2). (By default, the COBOL85 compiler expects this and the
HP COBOL 74 compiler does not.)
Default: TANDEM
Placement: Anywhere
Scope: TANDEM or ANSI within a section of text obtained from a copy library or
source library is effective only for the length of that text section. When
the compiler reverts to the source file where it found the COPY verb or
SOURCE directive, the previously active reference format applies.
Dependencies: None
References: ANSI
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.
TANDEM
ANSI
VST327.vsd
TRAP2
NOTRAP2
VST328.vsd