COBOL Manual for TNS and TNS/R Programs
Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs—522555-006
13-87
COBOLASSIGN
library-reference
is a mnemonic-name associated, in the SPECIAL-NAMES paragraph, with either
COBOLLIB or some other object file containing an object copy of COBOLASSIGN.
See Files of Dummy Routines.
fd-name
is the fd-name of a file connector. The file specified in the ASSIGN phrase of the
SELECT clause that references fd-name will be replaced by system-file-
name. If the program was compiled in OSS, the file will be an OSS file unless it
was defined as a Guardian file by an ASSIGN command; for example:
ASSIGN TO "GUARDIAN #DYNAMIC"
system-file-name
is a data item holding the file-system file name of the file to be assigned. On a
C-Series system, system-file-name can have a maximum of 34 bytes; on a
D-Series system, it can have a maximum of 35 bytes. The file name is in external
form.
The unused part of the data item must contain spaces.
If system, volume, or subvolume is not specified, the respective default value is
used.
The access mode (see Linkage Section) of system-file-name must be
STANDARD.
error-number
is a numeric data item, PIC 9(4) COMPUTATIONAL or DISPLAY, in which an error
code produced by COBOLASSIGN is returned. Possible values for error-
number and their respective meanings are:
The access mode (see Linkage Section) of error-number must be STANDARD.
COBOLASSIGN does not determine whether the assigned file actually exists or is
accessible. This checking is done by the OPEN statement. COBOLASSIGN can be
called repeatedly for one fd-name.
An attempt to open a file using a dynamically assignable fd-name before
COBOLASSIGN has been used on it is an attempt to open $volume.#DYNAMIC
(where $volume is the default volume). This causes a run-time error.
Value Meaning
0 No error occurred.
1 Invalid syntax is in the specified file-system file name.
2 Cannot change the file-system file name of a COBOL file that is open.
3 fd-name has not been declared as #DYNAMIC.