DBINFO [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
DBINFO
The DBINFO statement provides information about the database specified.
The information returned is restricted by the user class number when the
database is opened. Any data items, data sets, or paths of the database
that are inaccessible to that user are considered to be nonexistent.
Syntax
{DATASET [=] dataset}
DBINFO dbname$, {ITEMS [=] item }
, MODE [=] mode , RETURN [=] str_var [, STATUS [=] status_array(*)]
Parameters
dbname$ A string variable whose value is a TurboIMAGE database
name. dbname must be the variable that was passed to a
successful DBOPEN.
dataset A string expression with a maximum length of 16
characters. Its value is the name of a data set. The
name must be left-justified and if shorter than 16
characters must be terminated by a semicolon or blank.
This parameter can also be an integer or short integer
corresponding to the desired dataset number.
item A string or numeric expression that evaluates to the
name of a data item or evaluates to a numeric value
referencing a data item, respectively. Whether the
DATASET or ITEMS option is selected is dependent on the
mode selected as described in the DBINFO library
procedure in the TurboIMAGE/XL Database Management
System.
mode A numeric expression that evaluates to a short integer
indicating the type of information desired. Available
modes are detailed in the explanation of the DBINFO
library procedure in the TurboIMAGE/XL Database
Management System.
str_var The name of the string to which the requested
information is returned. The required length is
dependent on the type of information to be returned as
specified by the MODE parameter.
status_array A 10-element short integer array to which TurboIMAGE
returns an error code. If an HP Business BASIC/XL
database statement specifies the STATUS option, an error
does not abort the program. Following execution of the
database statement the program can check status_array
and handle the error. The values returned by TurboIMAGE
to this array are detailed in the description of the
status parameter of the equivalent TurboIMAGE library
procedure.
Examples
The following examples show the use of the DBINFO statement.
120 DBINFO Db$,DATASET=Ds$,MODE=M,RETURN=Buf$,STATUS=S(*)
130 DBINFO Db$,DATASET Ds$,MODE M,RETURN Buf$,STATUS S(*)
140 DBINFO Db$,ITEMS S$,MODE M,RETURN Buf$,STATUS S(*)
150 DBINFO Db$,ITEMS S$,MODE M,RETURN Buf$,STATUS S(*)
MPE/iX 5.0 Documentation