COBOL Manual for TNS and TNS/R Programs

Source Text Manipulation
HP COBOL Manual for TNS and TNS/R Programs522555-006
10-2
COPY Statement
COPY Statement
COPY summons source text from a file set up as a COPY library. In many systems,
one section of code or data is common to several programs. Such a section can be
written once, kept in a COPY library, and inserted into each program at compile time by
COPY statements. In HP COBOL, the COPY statement is a mechanism for
summoning text that is managed by the Data Definition Language (DDL) compiler.
(Another such mechanism is the SOURCE directive.)
COPY
is a reserved word that cannot be split across source program lines.
text-name
is the name of a section in a COPY library file. It is a COBOL word (1 to 30 letters,
digits, and hyphens but not all digits) that appears in a SECTION directive in the
file.
library-name
is the name of the COPY library file that contains the text to be copied.
COPY
library-name
REPLACING phrase
OF
IN
.
text-name
VST244.vsd
system-file-name
define-name-literal
VST245.vsd