SUMMARY d_encode_dba (file,slot,dba) int file; long slot; DB_ADDR *dba;
ARGUMENTS
file The file number of the database to be formed.
slot The slot number of the database to be formed.
dba A pointer to DB_ADDR variable to which the encoded database address will be returned.
DESCRIPTION Function d_encode_dba forms a database address from file number file and slot number slot. The encoded database address is returbed in a DB_ADDR variable pointed to by dba. The format of a database address is decribed in Section 11.2.2.1 and the use of d_decode_dba is explained in Section 6.4.3 of the USER's Guide.
CURRENCY CHANGES None
RETURN CODES No special codes.
EXAMPLE DB_ADDR dba; /* database address */ int file; /* file number */ long slot; /* slot number */ struct record rec; /* db_VISTA record buffer */ .... /* extract file number of slot number from id number string */
/* form database address */ d_encode_dba (file,slot,&dba);
/* set current record and read record contents */ d_crset(&dba); d_recread(&rec);