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

4-: 65
110 IMAGE DDD,XX,DDD,XX,DDD,XX
210 IMAGE 3 (DDD,XX)
310 IMAGE DDDDD,XX,ZZZ.DD
410 IMAGE 5D,2X,3Z.DD
The format strings of lines 110 and 210 are equivalent, as are the format
strings of lines 310 and 410. In line 210, three is the repeat factor
represented by
num_expr
, above. In line 410, the numbers 5, 2, and 3 are
also called repeat factors; "Digit Symbols" and "Space Specifications" in
chapter 6 explain them.
IN DATASET
The IN DATASET statement specifies the record format of a particular data
set. It is used to unpack data after the data is retrieved from a
database by a SORT, SEARCH, or DBGET statement. It is also used to
specify how data is packed for use by DBPUT and DBUPDATE statements.
The record format of a data set is required in order to accurately
compute the location of the sort key and to evaluate the search
condition. Therefore, a program must contain IN DATASET statements to
SEARCH or SORT a database. When used, this statement must correspond to
the record layout of the data set in the database.
If a string, string array, or numeric array is used as a formal parameter
in an IN DATASET statement a compile time error will occur when that
parameter is referenced before the sorted key in a SORT statement.
Syntax
IN DATASET
dataset
USE [REALV]
item_list
Parameters
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.
REALV The default real data type in a native mode program is
in IEEE floating point real format. Therefore, REALV
must be specified in the IN DATASET statement if the MPE
V real data format is desired.
item_list
A list of any of the following separated by commas:
Scalar numeric variable
Scalar string variable
Substring
String or numeric array
String or numeric literal
A numeric literal type converted with one of the
following built-in functions:
SINTEGER
INTEGER
SREAL
REAL
SDECIMAL
DECIMAL
Space specifier: SKIP
number
, where
number
is a numeric
constant.
Examples
The following examples show the use of the IN DATASET statement.
300 IN DATASET Dset$ USE A, B, SKIP 4, D$
400 IN DATASET Dset$ USE 3.019,"Super",SREAL(1)