Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual—522629-013
5-62
FILE_GETINFOBYNAME_ Procedure
Parameters
error returned value
INT
is a file-system error number indicating the outcome of the operation.
filename:length input:input
STRING .EXT:ref:*, INT:value
specifies the name of the file of interest. The value of
filename must be exactly
length bytes long and must be a valid file name or DEFINE name. If the name is
partially qualified, it is resolved using the contents of the =_DEFAULTS DEFINE.
type-info output
INT .EXT:ref:5
returns an array of INT values that contain information about the file. The
meanings of these words are:
[0] Device type
[1] Device subtype
[2:4] The meanings of these words depend on the device type. When the
device type is 3 (disk) the meanings are:
[2] Object type. For disk files, a value greater than 0 indicates an SQL
object; 0 indicates a nonSQL file. -1 is returned for nondisk files.
[3] File type. For disk files, indicates the file type:
0 unstructured
1 relative
2 entry-sequenced
3 key-sequenced
-1 is returned for nondisk files.
[4] File code. For disk files, gives the application-defined file code (file
codes 100-999 are reserved for use by HP). -1 is returned for
nondisk files.
If an
error value of 11 (file not found) is returned, the device type and subtype
values correctly reflect the device portion of the supplied file name, but the other
fields in
type-info do not contain valid information.
physical-recordlen output
INT .EXT:ref:1
returns the physical record length associated with the file:
nondisk
physical-recordlen is the configured devices record length.