COBOL Manual for TNS and TNS/R Programs

Environment Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
6-14
SPECIAL-NAMES Paragraph
File-Mnemonic Clause
The File-Mnemonic clause is, technically, a variant of thesystem-name IS
mnemonic-name ” clause, but its purpose is significantly different. It defines file-
mnemonic to be either a name that Binder or the linker uses to resolve an external
reference in the Procedure Division (see CALL and ENTER) or a name suitable for use
in ACCEPT and DISPLAY statements.
The keyword FILE informs the compiler that the next token is either an operating
system file name or (in the Guardian environment) a DEFINE name.
system-file-name
is a partially or fully qualified operating system file name. It can be represented as
a nonnumeric literal (enclosed in quotation marks).
In the Guardian environment, system-file-name must be represented as a
nonnumeric literal if it has the same spelling as a COBOL reserved word or has the
form subvolume-name.file-name. If system-file-name consists of a single
user-defined word or begins with one of the characters in this table, the compiler
recognizes it as a file name without its being in quotation marks:
In the OSS environment, system-file-name must have the syntax described
for filename in OSS Pathnames for OSS Files.
Example 6-1. ON STATUS Phrase
SPECIAL-NAMES.
SWITCH-4 IS TRANSACTION-TRACE,
ON STATUS IS TRACING-TRANSACTIONS ...
...
IF TRACING-TRANSACTIONS
WRITE ...
First
Character Meaning
\ System-name qualifier
$ Volume-name or process-name qualifier
# Special operating system file name qualifier
FILE
system-file-name
define-name-literal
file-mnemonic
system-file-name-word
IS
VST027.vsd