COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

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 COBOLFILEINFO would return an
inappropriate value of zero or an arbitrary, undefined value.
COBOL_FILE_INFO_
The COBOL_FILE_INFO_ routine is for both the OSS and Guardian environments.
The COBOL_FILE_INFO_ routine is for these situations:
An application needs to perform some operation not defined in HP COBOL on a file normally
managed by the HP COBOL run-time routines. This application must obtain the file system file
number assigned when the file was opened.
An application can put the file-system file name of a file into an application-generated error
message.
As with any ENTER statement, you must either qualify the name COBOL_FILE_INFO_ with the
library-reference ZCOBDLL or include a SEARCH directive specifying ZCOBDLL to provide
automatic resolution of the reference. The general form of the ENTER statement to use
COBOL_FILE_INFO_ follows.
library-reference
is a mnemonic-name associated, in the SPECIAL-NAMES paragraph, with either ZCOBDLL or
some other object file containing an object copy of COBOL_FILE_INFO_.
file-name
is the COBOL name of the file in the FD entry.
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.
ZCOBDLL Routines 651