COBOL Manual for TNS and TNS/R Programs
Input and Output Concepts
HP COBOL Manual for TNS and TNS/R Programs—522555-006
26-4
COBOL File Names
node-name
is a backward slash (\) followed by an alphabetic character and up to six
alphanumeric characters. Example: \mynode.
ldev-number
is a dollar sign ($) followed by an integer whose value is less than or equal to
34492. Example: $12345.
device-name
is a dollar sign ($) followed by an alphabetic character and up to six alphanumeric
characters. Example: $printr2.
qualifier
is a number sign (#) followed by one to seven alphanumeric characters. Example:
#PRINTR2.
An example of a nondisk file name is \mynode.$printer2.#S. If \mynode is the default
node, then these are equivalent:
\mynode.$printer2.#S
$printer2.#S
COBOL File Names
A COBOL file name is the name by which a particular HP COBOL program recognizes
a system file. It is unique within the HP COBOL program. A COBOL file name is the
file-name in the file-control entry (in the Environment Division) and the file
description entry (in the Data Division). A file-name must meet these criteria:
•
Consist of one or more (a maximum of 30) alphanumeric characters (letters, digits,
and hyphens)
•
Contain at least one nonnumeric character (letter or hyphen)
•
Not begin or end with a hyphen
Letters can be uppercase or lowercase.
Note. HP COBOL requires a file-name to contain at least one nonnumeric character;
COBOL requires a file-name to contain at least one letter.
Example 26-1. COBOL File Names
MAJRACCT
MAJOR-ACCOUNT
MajorAccount-3