Purpose: The DIF DBIO command can be used to load a keyed table for use by product rules languages. The rules can be used to look up entries in the table and retrieve fields from records. For more information, see Keyed Tables on page 3-26 in the Rules Language Programming Guide.
Syntax:
DBIO LOAD {parmlib-ddname}
DBIO FREE {parmlib-ddname}
Comments: Loading the Table
The DBIO LOAD command builds an index for the record keys in a data space.
The records in the table can also be loaded into a data space or left on disk. The
parmlib-ddname positional parameter specifies a PDS member name located
in a PARMLIB data set allocated to the DIF started
task. The member contains the file definition information.
The File Definition
The parmlib-ddname member contains the file definition statements for the keyed table, similar to a database schema.
- DDNAME: Defines the name of the DD statement in the DIF started task that contains the table records.
- KEY: Defines the offset and length of the record key.
- By default, both the key and data are loaded into a data space.
- If
DISKis specified as the third parameter, only the key fields are loaded into the data space and an I/O is performed to obtain the record. - FIELD statements: Used to map the fields within the records.
DEFVAR statements to access the
table information. DEFVAR
statements to access the table information. A sample field definition member follows:
DDNAME(RR) KEY(1,44)
FIELD RR_F1 POSITION(1) LEN(44)
FIELD RR_F2 POSITION(45) LEN(2)
FIELD RR_F3 POSITION(47) LEN(8)
FIELD RR_F4 POSITION(55) LEN(10)
Freeing the Table
The DBIO FREE command removes the index for the record keys from the data
space. If INSTORAGE was specified in the file definition member, the records
are also removed from the data space.
Examples: The following command will load the TABLERR
keyed table into a data space.
F DIF,DBIO LOAD TABLERR