Previous Topic

Next Topic

Book Contents

Book Index

Loading Information into the Global Index DB2 Tables

There are two methods for loading information into the global index DB2 tables:

The Index values will be loaded to the DB2 table specified for this PATH in the CTDGIDB2 member. If several DB2 tables are specified, the values are loaded to the first table in the list.

This method is recommended to use for reports that do not contain a large number of Index values. Using this method for reports with a large number of Index values, considerably reduces the decollation mission’s performance.

  1. Run the CTVUPGDB utility with the LIST input parameter set to DB2. For a description of the utility parameters see the CTVUPGDB utility in the INCONTROL for z/OS Utilities Guide.

    The CTVUPGDB utility unloads index values with report keys from the Control-V repository to the flat file pointed to by the DACTVLST DD statement. Only indexes existing in the CTDGIDB2 member of the reports matching the selection parameters are unloaded to the file.

    The file includes the following record types:

    Table 172 V Record Layout

    Position

    Value

    Length

    2

    V

    1

    3

    Index path value, which contains all index level values, with lengths specified in the decollation mission definition (without separators).

    222

    240

    Path number from the CTDGIDB2 member

    3

    243

    Report key

    24

  2. Load the DB2 tables using the DB2 LOAD utility from the file created in step 1. Only V records are used.

    Several DB2 tables can be loaded by a single run of the utility. Each INTO TABLE statement, followed by its field description statements, must be specified for each DB2 table to be loaded.

    The INTO TABLE statement has the following syntax:

    INTO TABLE TABLE_NAME WHEN (240:242)=NNN

    where NNN is the path number specified in the CTDGIDB2 member for the path that covers all fields of the loaded DB2 table.

  3. Delete the file indicated by the DACTVLST DD statement. This can only be done if the previous step ended successfully. If the previous step fails, the DACTVLST file is not deleted. The entries from this file are loaded to DB2 tables by the next run of the job.

    An example providing for the loading of several DB2 tables in a single job is shown in the following sample job:

    Figure 65 CTDGBILD Member Sample Job

//CTVUPGDB   EXEC CTVUPGDB

//DACTVLST DD DSN=CTVP.V900.INDLST01,DISP=(MOD,CATLG,DELETE),

//    SPACE=(CYL,(10,10),RLSE)

//SYSIN DD *

LOAD

USER=(PROD,MGT)

JOBNAME=JJJ*

PATH=ACCOUNT/DATE

PATH=ACCOUNT/NAME

PATH=WAREHOUSE/ITEM_NUM

LIST=DB2

/*                                                         

//DB2LOAD EXEC DSNUPROC,COND=(4,LE)

LOAD DATA

  RESUME YES

  INTO TABLE CTD.GIRAD WHEN (240:242) = '002'

  ( ACCOUNT  POSITION (3) CHAR(10),

   DATE_     POSITION (13)CHAR(8),

   REP_KEY   POSITION(243)CHAR(24))

  INTO TABLE CTD.GIRAN WHEN (240:242) = '003'

  ( ACCOUNT  POSITION (3) CHAR(10),

  NAME       POSITION (13)CHAR(15),

  REP_KEY      POSITION(243)CHAR(24))

INTO TABLE CTD.GIRWI WHEN (240:242)=’004’

( WAREHOUSE POSITION (3) CHAR(4),

  ITEM_NUM POSITION (7) CHAR (10)

  REP_KEY POSITION(243) CHAR(24))

//SYSREC  DD DSN=CTVP.V900.INDLST01,DISP=OLD

//SORTOUT DD UNIT=SYSDA,SPACE=(CYL,(100,10))

//SYSUT1  DD UNIT=SYSDA,SPACE=(CYL,(100,10))

//*

//DELETE EXEC PGM=IEFBR14,COND=(4,LT)

//SYSTSIN DD DISP=(OLD,DELETE),

//       DSN=CTVP.V900.INDLST01

//

Parent Topic

Creating and Maintaining the Global Index Database