Previous Topic Next topic Print topic


File Information

Returns general file information for all file organizations with headers and, for indexed files, information on the file keys in the form of the key definition block.

Opcode Operation File Types
06 Return file information I vS vR

Input Fields

fcd-organization File organization (can be x"FF")
fcd-name-length Length of filename
fcd-filename-address Pointer to the filename area
fcd-key-def-address Pointer to the key definition block (I)

Output Fields

Key definition block (I)  
fcd-file-status File status
fcd-organization File organization
fcd-file-format File format
fcd-max-rec-length Maximum record length
fcd-recording-mode Recording mode
fcd-min-rec-length Minimum record length
fcd-reladdr-offset or fcd-reladdr-big File size
fcd-data-compress Data compression routine

It is your responsibility to ensure that you have enough space allocated for the key definition block to hold all the information returned. Failure to allocate enough space causes corruption of some data areas.

For variable-length sequential files and variable-length relative files, no key definition information exists.

If you can set the organization byte of the FCD to x"FF" before using this operation code, an attempt is made to determine the file type and return with the relevant information set. This mode of operation is not recommended if you use any fixed-length sequential files as it might be impossible to determine the difference between the first record of a fixed-length sequential file and the header of a variable-length sequential file. If the file type cannot be determined, the error code 9/161 is returned.

Previous Topic Next topic Print topic