DBLIST C-3





Copyright (C) 1994-95 Conetic Software Systems, Inc. All names, products, and services mentioned are the trademarks of their respective organizations.



NAME


dblist - set up user record fields

SYNOPSIS


#include 

long dblist (fldptrs, fcb)
char **fldptrs;
DFILE *fcb;

DESCRIPTION


Dblist declares a list of fields that comprise the user record
for an RMSfile. Dblist allows a program to define the fields that
shall be accessed from each record in the RMSfile.

Fldptrs is a pointer to a list of pointers that point to strings
that contain the names of the fields the calling program wants to
access. The order of the fields in fldptrs must match the order
of the fields in your user record structure exactly.

After your program calls dblist, all further calls to the RMS
system up to the next dblist call use the field list of this
call. On a find call, only the fields requested are returned. On
an update call, only the fields specified are altered. Finally,
when adding records to the RMSfile, only those fields specified
are put into the RMSfile; all other fields in that record are
zeroed.

Fcb is the file block pointer returned by dlopen(C-3) or
dopen(C-3).

The value returned is the size of the new user record in bytes.
All fields are properly aligned for each field's data type. See
Appendix B for more information on datatype alignment.

SEE ALSO


drlist(C-3), dlopen(C-3), dopen(C-3)
Chapter 4, RMS Programming Guide

DIAGNOSTICS

Dblist returns a value of BAD (-1) if the dictionary for the
RMSfile cannot be found or if one of the fields in the list is
not in the dictionary.

NOTES


The data type and size of each field in your user record
structure must match the data type and size of the corresponding
field in the RMSfile.

drlist(C-3) is an improved version of dblist that handles
differences between the data type and size of fields in your user
record structure and the fields in the RMSfile.