Guardian Procedure Calls Reference Manual
Returned Value
INT
A file-system error code that indicates the outcome of the call.
Considerations
• You can obtain the last-error value resulting from a file operation that is not associated
with a file number by specifying a filenum value of -1 to FILE_GETINFO_. An error code
can be obtained in this manner for such operations as a purge, waited open, or failed create
operation. The result of a preceding awaitio[x] or alter operation can also be obtained in this
manner.
• When -1 is supplied for filenum, only last-error returns useful information. A
filename-length of 0 is returned.
• If FILE_GETINFO_ is called subsequent to a file close, an error value of 16 (file not open)
is returned.
• FILE_GETINFO_ can be used to obtain attributes for format 2 legacy key-sequenced files with
increased limits and enhanced key-sequenced files with increased limits in H06.28/J06.17
RVUs with specific SPRs and later RVUs; the behavior of the API is unchanged. (For a list of
the required H06.28/J06.17 SPRs, see SPR Requirements for Increased Enscribe Limits for
the H06.28/J06.17 Release (page 31).)
OSS Considerations
• Use the flags parameter of FILE_GETINFO_ or FILE_GETINFOBYNAME_ or use item code
161 of FILE_GETINFOLIST_ or FILE_GETINFOLISTBYNAME_ to determine whether the file is
an OSS file.
• Use the item-list parameter of FILE_GETINFOLIST_ or FILE_GETINFOLISTBYNAME_ to
specify which OSS file attribute values are to be returned.
Example
error := FILE_GETINFO_ ( filenum, lasterror ); ! obtain
! error from
! last file
! operation
Related Programming Manuals
For programming information about the FILE_GETINFO_ procedure, see the Guardian Programmer's
Guide. For information on the SQL objects and programs, see the HP NonStop SQL/MP
Programming Manual for C and the HP NonStop SQL/MP Programming Manual for COBOL.
406 Guardian Procedure Calls (F)