Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual—522629-013
5-68
FILE_GETINFOLIST_ Procedure
result-length output
INT .EXT:ref:1
returns the length in bytes of the array of values returned in
result. result-
length is an odd value only if the last value in the array has an odd length.
error-item output
INT .EXT:ref:1
returns the index of the item that was being processed when an error was
detected. The index of the first item in
item-list is 0.
Considerations
•
Normally if an error is returned, the contents of the result parameter are
undefined. However, if the returned error code is 2 (operation invalid for file type),
the
result parameter contains a combination of correct values (for valid items)
and unchanged memory locations (for invalid items because of the kind of file).
The
error-item value points to the first invalid item.
When error 2 occurs, any items prior to the one pointed to by
error-item are
returned with correct values in the
result parameter; following items might or
might not be valid. If a following item is known to be valid because of the kind of
file involved, the correct
result value for the item can be accessed in the
corresponding location in the
result buffer. To do so, the program will have to
account for space in the buffer reserved for preceding invalid items as well as for
space for preceding valid items. (Preceding in this case refers to
some item that
occurs before the item in question.) See description of items in Table 5-4
to
determine the kinds of files for which an item is valid.
Invalid items that are fixed-size will have the amount of space reserved in the
result buffer, but that section of buffer will be unchanged. Invalid items that are
variable-sized have no space reserved for them, but this should not be depended
upon because they could become valid in a future RVU and thus start occupying
space. The programmer might want to place all the items that could cause error 2
in the item list after those that are not expected to cause this error.
•
If a file number for which information is being retrieved was opened with the
unstructured access option, the provided information appears as if the file is an
unstructured file without partitions or alternate keys.
•
The file system stores error information for the last operation that was not
associated with a file number (such as a purge, waited open, or failed create
operation; the result of a preceding awaitio[x] or alter operation is also stored). You
can obtain this stored information from FILE_GETINFOLIST_ by supplying a value
of -1 for
filenum. The error information is returned in items 7 through 10. Valid
values are also returned for items 19 and 20.