COBOL Manual for TNS/E Programs (H06.03+)
Libraries and Utility Routines
HP COBOL Manual for TNS/E Programs—520347-003
13-67
COBOL_ASSIGN_
If the program identifies system-file-name as an OSS file system name, then
the program assumes that fd-name is an OSS file; otherwise, the program
assumes that fd-name is a Guardian file.
If system, volume, or subvolume of a Guardian file is not specified, the respective
default value is used ($volume.file is no longer allowed.)
If system-file-name is omitted, COBOL_ASSIGN_ does not change the
original file-system file name.
For more information on OSS file system names, see Files in the OSS
Environment.
file-code
can be specified in the Guardian environment only. It is a numeric data item or a
numeric literal whose value is a file code acceptable to the file system. For
example, file code 101 indicates that the file is an EDIT file and file code 180
indicates that the file is an OSS ASCII text file.
If file-code is omitted, COBOL_ASSIGN_ does not change the original file
code.
file-type
can be specified in the Guardian environment only. It is a numeric data item whose
content, or a numeric literal whose value, is either 0 (for an unstructured file) or 2
(for an entry-sequenced file). You can specify file-type only for a file whose
organization is sequential. For other file organizations, the organization determines
the file type (relative for ORGANIZATION RELATIVE and key sequenced for
ORGANIZATION INDEXED).
If file-type is omitted, COBOL_ASSIGN_ and does not change the original file
type.
error-number
is a numeric data item in which COBOL_ASSIGN_ returns an error code. Possible
values for error-number and their respective meanings are:
Value Meaning
0 No error occurred.
1 system-file-name has invalid syntax or the name has no length (such as
a group containing an OCCURS DEPENDING whose length is 0).
2 system-file-name is open and cannot be changed.
4 There is not enough system space to add the new name.
5 file-type is not 0 or 2, file-type is specified for a file whose
organization is not sequential, or file-type or file-code is specified for
an OSS file.










