GETREC - get next logical record, with rcw, from a file.

Alternate Entry Name: .GTREC

Usage:

B:
   status = getrec( [unit,] vector [, max ] );
C:
   int getrec( [FILE *unit,] void *vector [, int max] );

Where:

unit
is an open input unit. If "unit" is not specified, the current read unit is used.
vector
is a vector into which the current record, complete with record control word (rcw), is moved.
max
is an limit on the number of words to move. "max" is the size of the largest index of "vector", i.e. one less than the total number of words in "vector". If "max" is not specified, GETREC assumes that "vector" is large enough to hold any logical record (essentially an unlimited maximum).
status
is zero if the record is obtained successfully. GETREC returns a negative "status" if "unit" is not open, is not an input file, or is at end-of-file.

Description:

GETREC moves the current record (up to "max" words + rcw) to "vector", so that the next record becomes the current record. GETREC assumes that a GFRC standard system format file is being read. Records with media codes 8, 11, 12, 14 or 15 are discarded.

If the logical record begins a spanned or partitioned record, the I/O package will combine the logical records of the set into one big record with an appropriate rcw.

The RCW placed in "vector[0]" decribes the date returned. If the actual input was too long the remainder of the record will be quietly discarded. If you want to check for a record longer than N words (not counting the RCW) you must call GETREC with "max" set to N+1, and then examine RCW.

Copyright © 1996, Thinkage Ltd.