get_next
Summary
#include <dataman/dataman.h>
get_next(idx_name) else ...
char *idx_name;
Description
int db_g_next(idx_name)
This function retrieves the next higher order key and its
associated record from the named index. Idx_name
is the name of the index that the next key is to be
retrieved from. If the current key is last in the index, the else clause
is executed. If there is a next key in the named index, the current
record in memory is flushed, the index KP is set to the
next key, the MFRP is set to the associated record and
that record is retrieved.
Example
#include <dataman/dataman.h>
main(argc,argv)
{
get_first(num_ix) else /* get first account */
fatal("Index %s is empty\n",num_ix);
while (1) {
... /* process */
get_next(num_ix) else /* next account */
break; /* end loop */
}
}
This will loop through an entire index.
«previous next»