This routine returns a variety of information about the open indexed file f, depending on the value of mode. The information is returned in the area pointed to by result. Most of the modes return one or more numeric values. These values are represented in result as fixed size fields with the numbers represented as strings. When more than one value is returned in result, the values are separated by commas.
The filesys.def COPY file contains layouts for each kind of information that can be retrieved with this routine.
The INFO routine has three parameters, f, mode, and result.
is a file handle returned by OPEN.
determines what result is returned with a series of comma-separated numbers that define the format of result. (Note that in the following descriptions, the first value is number 1, the second is number 2 and so on. The number of times the field number is repeated represents the size of the field. For example 111,22 indicates that two values are returned, the first one is three digits long and the second one is two digits long.)
When a particular mode cannot be determined by the file system, then the error value E_NO_SUPPORT is set. If a particular value of mode -1 or mode -2 cannot be determined, it is set to zero.
The following modes are supported:
-1 | This returns the same information as the l_parms parameter of the MAKE function. Result is in the format of 11111,22222,333 where: |
-2 | Returns the same information as the p_parms parameter of the MAKE function. Result is in the format of where: |
-3 | Returns the comment specified to the MAKE function that made the file. The format is a null-terminated string of up to thirty characters. |
-4 | Returns the number of records in the file. This is returned as a 10-digit number. |
-5 | Returns the 256-byte key translation table specified to MAKE when the file was originally made. If no key translation table was specified, then the E_NO_SUPPORT error is set. In this case, this should be simply taken to mean that the native key ordering was used. |
-6 | Returns the number of currently locked records for the file handle passed to I$IO. |
-7 | For Vision Version 4 and 5 files, returns the number of data and index segments in the form:
11111,22222 where:
For Vision Version 2 and 3 files, this mode always returns 00000,00000. |
-8 | Returns the name and size of a Vision Version 4 or 5 file segment.
This mode is different from the other modes in that it uses the third argument as both INPUT and OUTPUT. Set FS-TYPE to FS-DATA (255) or FS-INDEX (254) and FILE-SEGMENT-NUMBER to the number of the segment you want information about. Upon return, name will contain the filename of the segment and FS-SIZE will contain the size of the segment. The FILE-SEGMENT-INFO data item in filesys.def describes this structure. This operation can be called with a Vision Version 2 or 3 file, also. In this case, type is ignored, but seg must be 1. The name and size returned will be those of the single Version 2 or 3 file. |
-9 | Returns the sum of the sizes of all the segments that make up a Vision Version 4 or 5 file. The return value is 15 digits long. If called with a Vision Version 2 or 3 file, this operation returns the size of the single Version 2 or 3 file. |
-10 | Returns the version number of the Vision file in a three character string. For example, if the file is Vision Version 5, 005 is returned. |
0+ | A mode of zero or greater indicates that information about a particular key is desired. That key information is returned as
11,2,333,44444 where:
The third and fourth fields are repeated for each additional segment in the key. |