COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

library-name
is the name of the COPY library file that contains the text to be copied.
If library-name is not specified, a default library file is selected:
In the Guardian environment:
If a COPY library is named in the COBOL85 command (see Starting a Compilation
(page 529)), then that file is the default library file.
1.
2. If the condition in item 1 is not true and the file COPYLIB exists on the current volume
and subvolume, then that COPYLIB file is the default library file.
3. If the conditions in item 1 and item 2 are not true and a DEFINE of class SEARCH
named =_SOURCE_SEARCH exists, then the default library file is the first file named
COPYLIB in the search list defined by =_SOURCE_SEARCH. (See =_SOURCE_SEARCH
(page 529).)
4. If none of the preceding conditions are true, the COPY statement is in error.
In the OSS environment, the -Wcopylib flag specifies the default COPY library.
If library-name is specified, these definitions apply:
system-file-name
is the name of an EDIT file (code 101), OSS ASCII text file (code 180), or PC file. If
system-file-name is a PC file name or does not begin with a dollar sign ($), backward
slash (\), or number sign (#), then it must be enclosed in quotation marks unless it forms a
COBOL word. For more information about operating system file names, see the Guardian
Procedure Calls Reference Manual.
define-name-literal
is a nonnumeric literal that represents the name of a DEFINE of class MAP that is associated
with an EDIT file. Quotation marks must enclose define-name-literal. For more information
on DEFINE names, see DEFINEs (page 593).
If the file-system file name identified by define-name-literal is qualified (the subvolume
and any other qualifiers are specified), then that specific file is the COPY library. If the file-system
file name identified is not qualified, the file selected as the COPY library depends on the
presence or absence of a DEFINE of class SEARCH named =_SOURCE_SEARCH. If
=_SOURCE_SEARCH exists, the search list that it specifies is used to locate the COPY library.
If =_SOURCE_SEARCH does not exist, only the current volume and subvolume is searched for
the COPY library.
REPLACING phrase
specifies text-words for the compiler to replace with other specified text-words when it copies
text. See REPLACING Phrase.
Usage Considerations:
Where COPY Statements Can Be Used
With these exceptions, a COPY statement can occur anywhere in the source text that a
character-string or separator can occur:
A COPY statement cannot appear within the body of another COPY statement.
A COPY statement cannot appear within source text that is introduced by another COPY
statement or a REPLACE statement.
500 Source Text Manipulation