|
The DBMAINT call is undocumented on MPE and may be used to create or erase a
database. The Eloquence implementation in addition supports purging of a
database.
DBMAINT(base,password,mode,status)
- base
-
is the name of an integer array containing a string of ASCII
characters. The string must consist of two blanks followed by
a left-justified database name and terminated by a semicolon,
a space or a NUL character, for example: " ORDERS;"
Please refer to the section on Database Names
for detailed information.
As a replacement for MPE file equations, DBOPEN checks for an environment
variable that matches the database name. If found, the value of this
variable is used to replace the database name passed to DBOPEN.
To be effective, the environment variable needs to start with the prefix
"EQ3K__" followed by the upshifted database name. Any dot characters (.)
in the database name are replaced by underscore characters (_).
For example:
Database Name Environment Variable
--------------- ---------------------
Sample EQ3K__SAMPLE
sample.test EQ3K__SAMPLE_TEST
- password
-
is the name of an integer array containing a left-justified string
of ASCII characters consisting of an optional password followed
by an optional user identifier.
The following constructs are valid for the password and user identifier
(a _ represents a blank):
password [{_;}[/USERIDENT{_;}]]
[/USERIDENT]{_;} Provides user name and empty password
;[/USERIDENT{_;}] Same
password[/USERIDENT]{_;} Specifies user name and password
The password or the user identifier string must be terminated by
a semicolon, space or NUL character. Since Eloquence does not
assume a fixed length, a termination character should alsways
be present.
Unless the password and the user identifier string is present,
the password argument is ignored.
Please refer to the section on
Database Security and Authorisation
for detailed information.
- mode
-
is an integer equal to 1, 2, or 4 indicating the type of
operation requested:
Mode |
Type of operation |
1 |
Create the database
|
2 |
Erase the database
|
4 |
Purge the database (Eloquence specific)
|
- status
-
is the name of an array of 10 halfwords in which the database returns
status information about the procedure. If the procedure executes
successfully, the status array contents are:
Element |
Contents |
1 |
If the procedure succeeds, the return status is 0.
Otherwise it provides a status code to describe the failure.
|
2-4 |
Unchanged from previous procedure call using this array.
|
5-10 |
Information about the current procedure call and its results.
|
Notes:
-
DBMAINT requires exclusive access to the database and affects all sets
of a database. The Eloquence dbcreate, dberase and dbpurge utility
programs allow to specify a list of data sets in addition.
-
Eloquence either requires that the user has administrative access to
the database (eg. it is member of the "dba" group) or has the erase
privilege (in case of mode 4).
-
The Database name is not limited to 8 characters and must
follow the Eloquence conventions.
The database name must either be separated by a NUL character,
a semicolon or a space character. Since Eloquence database names
are not limited to a fixed length a terminating character must be present.
Please refer to the section on Database Names
for detailed information.
-
Remote database handling is different (the server instance is encoded
with the database name).
-
Eloquence uses a different access control scheme than TurboIMAGE.
The Eloquence database maintains users with passwords.
The user name and password can either be specified with the
DBOPEN password argument or the Eloquence specific DBLOGON
call can be used. It no user name is specified a default
user ("public") is used.
Status element 2 returns the user id which is different from
the user class returned by TurboIMAGE.
Please refer to the section on
Database Security and Authorisation
for detailed information.
-
If a user name is present in the password argument (the optional
"identifier") it is used as authorisation information with the
database server. If only a password is present the password argument
is ignored and the default user ("public") is used which is the
Eloquence equivalent to user class 0.
-
Eloquence does not implement "Creator Access". Instead an
adminstrative access group ("dba") is added to each database which
by default is associated with the default adminstrative user ("dba").
The dba group does not grant access to the database contents but can
only be used to maintain the database. The dbutil utility program
can be used to grant additional access rights to the dba group.
-
Eloquence users and passwords are not limited to 8 characters.
However due to the design of the TurboIMAGE API the IMAGE3K library
is unable to reliably determine the bounds of the password and
user argument unless a termination character is present (either
space or semicolon) or a NUL character is used to terminate the
password argument. It is recommended that the password and the
optional identifier are terminated with a space or semicolon
character.
|
|