B97DLOAD: Download batch utility

Overview

The download batch utility (B97DLOAD) reads data from the Adabas Audit Data Retrieval database and writes it to a sequential dataset.

You can find a tailored JCL for this utility in the BETA97.CNTL in member B97DLOAD.

Use DD SYSIN to specify which data should be extracted from the database.

The corresponding upload utility is B97BUTLT.

SYSIN syntax

Use a BQL SELECT statement to specify which data should be downloaded:

SELECT TABLE tablename -
FIELDS(field_1,field_2,...,field_n) -
WHERE (field operator value)

The WHERE condition is optional. If a value in the WHERE condition contains blanks, it must be enclosed in double quotation marks ("value with blanks").

Specify FIELDS(*) to extract all fields.

The continuation sign - (hyphen) may be placed anywhere at the end of the line.

To mark a line as comment line, enter an asterisk ( * ) in the first column of the line.

Examples

This example downloads all Adabas Audit Data Retrieval list/report definitions:

+--------------------------------------------------------------------+
|//SYSIN DD * |
| SELECT TABLE LDR FIELDS(*) |
+--------------------------------------------------------------------+

This example downloads the FORM and EXTENSION fields of the Adabas Audit Data Retrieval list/report definitions:

+--------------------------------------------------------------------+
|//SYSIN DD * |
| SELECT TABLE LDR FIELDS(FORM,EXTENSION) |
+--------------------------------------------------------------------+

This example downloads the FORM and EXTENSION fields of the Adabas Audit Data Retrieval list/report definitions whose owner is CUST001:

+--------------------------------------------------------------------+
|//SYSIN DD * |
| SELECT TABLE LDR FIELDS(FORM,EXTENSION) - |
| WHERE (OWNER EQ CUST001) |
+--------------------------------------------------------------------+

This example downloads the FORM and EXTENSION fields of the Adabas Audit Data Retrieval list/report definitions whose owner matches the mask CUST*:

+--------------------------------------------------------------------+
|//SYSIN DD * |
| SELECT TABLE LDR FIELDS(FORM,EXTENSION) - |
| WHERE (OWNER LIKE CUST*) |
+--------------------------------------------------------------------+

This example downloads the FORM and EXTENSION fields of the Adabas Audit Data Retrieval list definitions whose title contains GENERATED BY:

+--------------------------------------------------------------------+
|//SYSIN DD * |
| SELECT TABLE LDR FIELDS(FORM,EXTENSION) - |
| WHERE (LTITLE LIKE "*GENERATED BY*" - |
| AND REPORT EQ " ") |
+--------------------------------------------------------------------+

BYTE and FLAG fields

Important

The values of BYTE and FLAG fields must be specified using the external format. The corresponding language-dependent values must be specified in English.

Example

All list definitions where item processing mode is selected:

SELECT TABLE LDR FIELDS(*) -
WHERE (ITEM_PROCESSING_MODE = YES)

Records of all archive datasets that are not cataloged:

SELECT TABLE AGR FIELDS(*) -
WHERE (AGRCAT = "NOT CATALOG")

Use the database dictionary (option D.2) to find out about legal values.

JCL

+--------------------------------------------------------------------+
|jobcard |
|//B97DLOAD EXEC PGM=BST01RFF,REGION=0M,PARM=('S=97', |
|// 'PGM=B97DLOAD', |
|// 'B01LST=xx', |
|// 'B97LST=xx', |
|// 'SIGNON=YES') |
|//* |
|//STEPLIB DD DISP=SHR, |
|// DSN=BETA97.LOAD |
|// DD DISP=SHR, |
|// DSN=BSA.LOAD |
|//* |
|//B97DEF DD DUMMY |
|//SFFPARM DD DISP=SHR, |
|// DSN=BETA.PARMLIB |
|//* |
|//SYSPRINT DD SYSOUT=* |
|//IRMLOG DD SYSOUT=* |
|//* |
|//IRMPRINT DD DISP=(NEW,CATLG,DELETE), |
|// SPACE=(CYL,(10,2),RLSE), |
|// DSN=datasetname |
|//* |
|//SFFFDUMP DD SYSOUT=* |
|//SYSABEND DD SYSOUT=* |
|//* |
|//SYSIN DD * |
| SELECT TABLE name FIELDS(*) |
|/* |
+--------------------------------------------------------------------+

Return codes

0

The program terminated normally (*)

4

For at least one selection, the program did not find any data to be downloaded; the program terminated normally. (*)

12

Component error

16

Not enough memory

20

This return code can occur due to several reasons:

  • DD statement missing (*)
  • Error when opening a log file (*)
  • Syntax error in DD SYSIN (command error) (*)
  • Error while initializing the database access (*)
  • Database access error (*)

24

Communication error

32

BQL abend

36

BQL command error

Note: (*) indicates standard return codes that can be modified.

Adabas Audit Data Retrieval tables

Following is a list of database tables used by Adabas Audit Data Retrieval together with the corresponding online options. The database also contains other tables for internal use.

Table

Table long name

Online option

ADP

ARCHIVE DATASET POOL

Option A.1

ADS

ARCHIVE DATASET DEFINITION

Option A.1, line command A

ADT

ARCHIVE DEVICE TABLE

Option A.4

AGR

B97 AGR

Option A.2

AVR

ARCHIVE VOLUME RECORD

Option A.3

DOG

DISPLAY ORDER GROUP ENTRY

Option 2.6, line command L

DON

DISPLAY ORDER GROUP NAME

Option 2.6

FGN

FOLDER GROUP NAMES

Option 2.5

FGR

FOLDER GROUP RELATIONS

Option 2.5, line command F

GLN

GROUP LIST REPORT NAME

Option 2.4

GLP

GLOBAL INDEX PROCESSING RULE

Option 2.4, line command P

GLR

GROUP LIST REPORT

Option 2.4, line command L

IAR

IAR ARGUMENT

Option 1, line command IR

IDR

INDEX DESCRIPTION

Option 2.3

IDX

INDEX ARGUMENT

Option 2.1, line command IX

IGL

INTERNAL GLOBAL INDEX

Option 3.1 and 3.2

IGR

INDEXED LIST GENERATION

Option 1 and I

LDR

LIST REPORT DEFINITION

Option 2.1

MAC

USER BROWSE MACRO

Option C.2

MSG

MESSAGE

Option M

NTE

USER BROWSE NOTE

Option 1, Browser

RLD

RELOAD QUEUE TABLE

Option 3.3

RPG

RPG BATCH REPORT DEFINITION

Option S.4

RST

REMOTE SYSTEM TABLE

Option S.1

SAA

SEARCH ARGUMENT VALUE

Option 2.2, line command A

SAS

SEARCH ARGUMENT ID

Option 2.2

SYS

SYSTEM

Option S.2

UGF

USER GENERATION PROFILE

Option C.U

VCI

USER TABLE

Option C.1