COBOL Manual for TNS and TNS/R Programs

Compiler Directives
HP COBOL Manual for TNS and TNS/R Programs522555-006
36-8
COLUMNS
COLUMNS
COMPACT and NOCOMPACT
Default: COLUMNS 132
Placement:
On a directive line, COLUMNS must begin with a question mark (?)
in column 1, regardless of any active ANSI directive.
In a COPY library or a source library, COLUMNS must be the only
directive on its line and must precede all SECTION directives in that
library.
The COBOL85 compiler accepts at most one COLUMNS for each
source file (that is, one for the primary source file and one for each
COPY library or source library called by the primary source file).
Scope: When the compiler shifts from reading the primary source file to reading
a COPY library (in compliance with a COPY statement) or a source
library (in compliance with a SOURCE directive), it saves the current
(default or specified) logical length for source lines. That length applies
to all source lines in the COPY library or source library, unless a
COLUMNS directive occurs in the COPY library file (as mentioned in the
preceding item). In this case, the compiler reverts to the saved logical
length when it resumes reading text from the primary source file.
Dependencies: COLUMNS works only if TANDEM is active.
References:
ANSI
SOURCE
TANDEM
Note. The NMCOBOL compiler, which does not use BINSERV, issues warnings for these
directives.
Default: COMPACT
Placement: Anywhere
Scope: The last COMPACT or NOCOMPACT in the compilation unit applies.
Dependencies: None
lengthCOLUMNS
VST270.vsd
COMPACT
NOCOMPACT
VST271.vsd