Loading data into a BQL database (BST05DBL)

Introduction

Program BST05DBL does the following:

  • It loads data from a sequential file into a BQL database.
  • It unloads data from a BQL database to a sequential file.

Use the command LOAD under DD BQLIN to load data into a BQL database.

Note

During the execution of this command, the BQL does not accept any other requests.

STC must be down

You must stop the started task before loading data into the BQL database using BST05DBL.

Structure of sequential file

DD BQLSAVE defines the sequential file containing the data to be loaded into the database. This file must be variable blocked.

The header of the records must have this structure:

Contents

Position

Length

Format

Record length

0

2

fixed

Reserved for future use

2

2

fixed 0

Table name

4

8

character

Reserved for future use

12

4

character

  • The first four bytes contain the record descriptor word (RDW) of a variable record. The existence of the record descriptor word is a prerequisite for assembling a variable record, according to z/OS.
  • The contents of the table must be entered in internal format below the record header (according to the table names entered).
  • The contents of the table entered here must correspond to the entries in the definition database.

Syntax DD BQLIN

+------------------------------------------------------------+
|LOAD TABLE * | tablename,... -|
| DDNAME(ddname) | DSNAME(dsname) -|
| MEMBER(name) -|
| VOLUME(volume) -|
| UNIT(unit) -|
| GENFILE(nn) |
+------------------------------------------------------------+

Keywords DD BQLIN

Keyword

Description

LOAD

Introduces the load command

TABLE *
TABLE tablename,...

Specifies which of the data contained in the sequential file should be loaded into the tables of the database

Code one or several table names to load only records of the specified tables.

Code an asterisk ( * ) to load the records of all tables.

DDNAME(ddname)

DD name of the sequential file

DSNAME(dsname)

Dataset name of the sequential file

MEMBER(name)

Name of the member (if dsname is a PO dataset)

VOLUME(volume)

Volume where the sequential file is stored (if not cataloged)

UNIT(unit)

Unit where the sequential file can be accessed (if not cataloged)

GENFILE(nn)

Number of the generation file

Note: GENFILE(nn) is required if the file to be loaded is a GEN file.