NAME
dbparse - parse logical name
SYNOPSIS
#include <cbase/dbase.h>
dbparse (lname, dbp, lfp)
char *lname, **dbp, **lfp;
DESCRIPTION
Dbparse parses a logical RMSfile name into its database and logical name parts. The string pointers dbp and lfp are set to point to null terminated strings containing the database name and logical RMSfile name, respectively.
Lname can have any of the following formats:
dbase~lfile dbp points to
dbase
lfp points to
lfile
~lfile dbp points to the default database name
lfp points to
lfile
lfile dbp points to the default database name
lfp points to
lfile
When lname contains a logical name without an explicit database, the default database must be set by a prior dbopen(C-3) call, or the environment variable DBASE must be set to the name of a valid database.
SEE ALSO
dbopen(C-3)
DIAGNOSTICS
If lname is either a path name or does not exist as a logical RMSfile, a value of -1 is returned.
NOTES
When dbparse returns the default database name, the string pointer returned for the database name points to static data. As such, the string returned in the pointer dbp should be saved before making any other RMS calls.