.TH store() "" "" "DBM Function (libgdbm)"
.PC "Write a record into a DBM data base"
.B "#include <dbm.h>"
\fBint store(\fIkey\^\fB, \fIdatum\^\fB)\fR
\fBdatum \fIkey\^\fB, \fIdatum\^\fB;\fR
.PP
Function
.B store()
writes a record into the currently open DBM data base.
The data base must first have been opened by a call to
.BR dbminit() .
.PP
.I key
points to the key by which the datum is identified.
.I datum
points to the datum itself.
If the data base already contains a record with
.IR key ,
.B store()
overwrites it.
.PP
The sizes of
.I key
and
.I datum
together must not exceed
.B BSIZE
bytes \(em that is, the size of one file-system block.
(\fBBSIZE\fR is defined in header file
.BR <sys/buf.h> .)
.PP
If all goes well,
.B store()
returns zero.
If an error occurs, it returns a negative value.
.SH "See Also"
.XR "dbm.h," dbm.h
.XR "dbminit()," dbminit
.XR "libgdbm" libgdbm
.SH Notes
For a statement of copyright and permissions on this routine, see the
Lexicon entry for
.BR libgdbm .
