By running the Build Index function, you can build secondary
index databases from the DEDB database. FPA runs the Build
Index function as a standard z/OS® batch
job. You must specify an EXEC statement and DD statements that define
the input and output data sets in your JCL.
Procedure
Optional: Estimate the region size that is
required to run the job.
DBRCGRP is an optional 1- to 3-character parameter that specifies the
identifier assigned to a group of DBRC instances (DBRC sharing group) that access the same RECON
data set in the IMSplex.
GSGNAME=
GSGNAME is an optional 1- to 8-character parameter
that specifies the global service group.
IMSPLEX=
IMSPLEX is an optional 1- to 5-character parameter
that specifies the IMSplex group names to share either databases or
message queues.
Specify the DD statements to define input data sets and
output data sets.
To
build secondary indexes by running two Build Index jobs (one in scan
mode and another in load mode), you must supply information about
build pointer segment record data sets. You can do so by specifying
DD statements (S0nnnnn0 DD) or utility control
statements.
Specify the utility control statements.
Specify the INDEXBLD command.
Specify the database name on the DBD keyword.
Either specify IDXPROC=BUILD, or specify no IDXPROC
keyword.
The IDXPROC keyword must specify BUILD to build
secondary index databases. The default parameter for the IDXPROC keyword
is BUILD.
Specify the runtime mode on the BUILDMODE keyword. You
can specify one of the following parameters:
SCANLOAD
The job runs in scan load mode. It scans the DEDB areas and builds
secondary index databases in one job step. BUILDMODE=SCANLOAD is the
default.
SCAN
The job runs in scan mode. It scans the DEDB areas and then generates
build pointer segment records. You must later run the job in load
mode to build secondary index databases.
LOAD
The job runs in load mode. It reads the records from the build
pointer segment record data sets and loads index pointer segments
into the secondary index databases.
Considerations for selecting a mode: Running the job in scan load mode is the easiest method
to build secondary index databases. However, in scan load mode, DFSORT
is internally used during the job to sort the records in build pointer
segment record data sets. If you want to use a different sort program,
you can run the job in scan mode, sort the records manually by using
your desired sort program, and then run the job in load mode.
If you run the job in scan mode, update the
statements or create another JCL job to run in load mode. Then, run
that job to load the secondary index databases.
In load
mode, if you specify SORT=YES, the sort is done during the job before
the pointer segments are loaded (SORT=YES is the default). If you
specify SORT=NO, sort is not done in the job. In this case, you must
manually sort the build pointer segment records before you
run the job in load mode.
Tips for manually sorting the records:
Secondary Index Processing report, which is generated in step 5, contains auto-generated
sort control statements for DFSORT. You can copy and paste the control
statements into a DFSORT job to sort the records with DFSORT.
To sort the records manually, use the first column as the starting
position of the sort field, and "key_length + 1"
as the length of the sort field.
Example
The following figure shows a JCL example for the INDEXBLD
command for building secondary index databases in scan load mode.
Figure 1. JCL example for the INDEXBLD command for building
secondary index databases (scan load mode)