include
Summary
#include <dataman/dataman.h>
include(ix1,ix2,key);
char *ix1, *ix2, *key;
Description
This routine will insert a key into an index file.
The procedure will associate the current MFRP of the
first named index with the key string, and insert that
into the second named index. The file that contains the record
being pointed to must, of course, be a member of both indices.
The syntax of the original EDITOR language was:
include ix1 in ix2 using key.
The semantics of this function are a bit ugly, but again
dictated by the original language.
Example
#include <dataman/dataman.h>
main(argc,argv)
{
key k_buff; /* key buffer */
char [21] in; /* key to insert */
...
get(num_ix,k_buff) else
fatal("Reference Key not on file","");
insert(1,BEFORE,num_ix); /* insert record */
strcpy(in, acct_num);
include(num_ix, num_ix, in); /* include # key */
strcpy(in, acct_name); /* set up name key */
include(num_ix, name_ix, in); /* include name key */
...
}
«previous next»