dbm_open Subroutine

Purpose

Opens a database for access.

Library

C Library (libc.a)

Syntax

#include <ndbm.h>

DBM *dbm_open ( file,  flags,  mode)
char *file;
int flags, mode;

Description

The dbm_open subroutine opens a database for access. The subroutine opens or creates the file.dir and file.pag files, depending on the flags parameter. The returned DBM structure is used as input to other NDBM routines.

Parameters

Item Description
file Specifies the path to open a database.
flags Specifies the flags required to open a subroutine.
mode Specifies the mode required to open a subroutine.

For more information about the flags and mode parameters, see the open, openx, or creat subroutine.

Return Values

Upon successful completion, this subroutine returns a pointer to the DBM structure. If unsuccessful, it returns a null value.