Processing Data Files

File Processing Functions

 

There are twelve file processing functions - all expect a file number as first argument.

FIB( )

Same as FID( ) but always returns PxPlus native format.

FID( )

Returns a description of characteristics of the file specified; returns 1 of 5 formats depending on the 'FF' parameter.

FIN( )

Returns detailed physical aspects of the file specified.

IND( )

Returns an index of the next record in the file. Generates an error at the end of file.

KEC( )

Returns a key of the current (last read/written) record.Generates an error at the start of file.

KEF( )

Returns the key of first record on the file. Generates an error if no records exist.

KEL( )

Returns the key of the last record on the file. Generates an error if no records exist.

KEN( )

Returns the key of the record after the next record to be read.

KEP( )

Returns the key of the previous record - keyed files only. Generates an error at the start of file.

KEY( )

Returns the key of the next record. Generates an error at the end of file.

RCD( )

Returns contents of a record - equivalent to READ RECORD. See Processing Records.

RNO( )

Returns the record number of a specified record in key sequence.

See System Functions for a complete list of system functions.