HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

4- 28
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
100 DBFIND Db$,DATASET Ds$,ITEMS K$,KEY A$
110 DBFIND Db$,DATASET Ds$,ITEMS=N,KEY=A$
120 DBFIND Db$,DATASET Ds$,ITEMS N1,KEY N2
130 DBFIND Db$,DATASET Ds$,ITEMS=K$,KEY=N
140 DBFIND Db$,DATASET Ds$,ITEMS K$,KEY A$,STATUS S(*)
150 DBFIND Db$,DATASET Ds$,ITEMS=N,KEY=A$,STATUS=S(*)
160 DBFIND Db$,DATASET Ds$,ITEMS N1,KEY N2,STATUS S(*)
170 DBFIND Db$,DATASET Ds$,ITEMS=K$,KEY=N,STATUS=S(*)
DBGET
DBGET reads an entire record or specified data items from a data set.
The DBGET statement can be used in the following ways:
DBGET...USING reads data into an internal buffer that
is used as a source for unpacking into a
list of local variables.
DBGET...INTO reads data into the buffer specified.
DBGET...USING...INTO reads data into the buffer specified by
the INTO clause that is used as a source
for unpacking into a list of local
variables.
Syntax
{INTO
str_var
}
{USING
line_id
}
DBGET
dbname
$ { {,} }
{USING
line_id
INTO
str_var
{;} DATASET[=]
dataset
}
[, MODE[=]
read_mode
]
[, ITEMS=
item_list
]
[ {
str_expr
}]
[, KEY={
num_expr
}]
[, 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.
str_var
The string variable buffer that the values of the data
items specified in the
item_list
are moved into. The
values in
str_var
must be assigned to HP Business
BASIC/XL variables using HP Business BASIC/XL's UNPACK
statement.
line_id
A line number or label for a PACKFMT or IN DATASET
statement. The referenced statement is used to unpack
data automatically into program variables.
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