#include <ufas.h> stat = u_pos( fp, U_BEGIN ); stat = u_pos( fp, U_FORW, nrec ); stat = u_pos( fp, U_BACK, nrec ); stat = u_pos( fp, U_ABS, relkey ); stat = u_pos( fp, U_ABS, keynum, keyptr );
"u_pos" positions a file. When searching for a key, the option U_EQ is equivalent to U_ABS. The options U_GT or U_GE may be used instead of U_ABS to search for records having a key greater than, or greater than or equal to, the given key.
Since the UFAS return value is interpreted in different ways depending on the type of positioning, this value is not returned by "u_pos". Instead, the function "u_stat" should be used to query the result.
The call
u_pos( fp, U_ABS );
is equivalent to the call
u_pos( fp, U_BEGIN );
UFAS restricts the positioning calls on various file types; the UFAS Manual should be consulted to determine which positioning options are valid.
Copyright © 1996, Thinkage Ltd.