COBOL Manual for TNS/E Programs (H06.03+)
Libraries and Utility Routines
HP COBOL Manual for TNS/E Programs—520347-003
13-72
COBOL_FILE_INFO_
name-buffer
is the buffer in which the file name is returned. To accommodate the maximum file
name size, name-buffer must hold at least 1023 characters. To accommodate
the largest Guardian file name, name-buffer must be at least 35 characters. If
name-buffer is too short for the file name, the file name is truncated. If the file
name is an OSS file, the terminating zero byte is included in the name and in the
name size.
name-size
is the data item in which the size of the file name is returned. If the file name was
truncated, name-size contains the actual size, not the truncated size.
file-number
is the Guardian or OSS file number. If the file is not open, file-number is 0.
If, after the file was opened, the I-O status code was “05,” rather than “00” (see
Nonexistent Files), file-number is -1.
error
is the last Guardian error number. If the file is an OSS file, error is 0.
Usage Consideration: Do not use COBOL_FILE_INFO_ to obtain the operating
environment error number associated with the failure of any input-output operation that
is performed simply with COBOL input-output verbs (such as READ). The HP COBOL
special register GUARDIAN-ERR was created for that purpose. Certain operations,
such as a READ statement operating on the $RECEIVE file, deliver meaningful values
to GUARDIAN-ERR, but a call to COBOL_FILE_INFO_ would return an inappropriate
value of zero or an arbitrary, undefined value.










