Previous Topic

Next Topic

Book Contents

Book Index

Relationship Between CTV Index Paths and DB2 Tables

The CTDGIDB2 member in the CTD PARM library includes a list of all paths that are handled by the Global Index Database, and defines the relationship between Control‑V Index paths and DB2 tables. This member contains the path number and the name of DB2 table storing information for this path. Subsequent lines contain Control‑V index names and corresponding field names in the DB2 table.

CTDGIDB2 member statements are described in the following table, and an example is provided below:

Table 171 CTDGIDB2 Member Statements

Statement

Description

DSN=DSN_NAME

DB2 Subsystem name

PLAN=PLAN_NAME

DB2 application plan name for the CTD DB2 interface module. This application plan should be bound from the DBRL member CTDGID supplied in the IOA SAMPLE library.

The two preceding statements are obligatory and should be coded only once on the top of the member. The PATH, TABLE, and FIELD statements shown below should be coded for each Global Index path. The REKEY statement is optional. The END line, as shown in the code example that follows this table, indicates the conclusion of the entire member statement.

PATH=NNN

or

PATH=NNN+

Number of the path. Each path should have a unique number. The ‘+’ sign should follow the number if this PATH must be loaded while running a decollation mission.

TABLE=TABLE_NAME

DB2 table name containing index values and report keys of the index path. This statement can be specified more than once if data for this path is kept in more than one table.

FIELD=
(NAME1,NAME2,LL) [,TABNAME [+]]

This statement should be coded for each index field in the path. In this statement

  • NAME1 is the Control‑V index name defined in the decollation mission definition
  • NAME2 is the name of the corresponding field in the DB2 table
  • LL is the length of the field. The value for LL should be the same as the Control‑V index length in the decollation mission definition.
  • TABNAME is an optional parameter. It is the name of an additional DB2 table that contains values of higher levels, including the current level. This table is used for fast retrieval of the list of the current level Index values. If this parameter is omitted, the list is retrieved from the main DB2 table indicated in the TABLE statement. If the "+" follows this name, the TABNAME table is loaded by the CTVUPGDB utility, or automatically from the decollation mission, while loading the main DB2 table. Otherwise, the table must be handled manually.

REPKEY=
REPORT_KEY_NAME

Name of the report key field in the DB2 table. Optional. Default REP_KEY.

END

Last statement in the member.

Figure 63 CTDGIDB2 Member Statement Example

DSN=DSN1                                       DB2 SUBSYSTEM NAME      

PLAN=CTDGIPL6                                  DB2 APPLICATION NAME

 PATH=001                                      PATH NUMBER             

 TABLE=CTD.GIRAD                               DB2 TABLE NAME          

    FIELD=(ACCOUNT,ACCOUNT,10)                 INDEX LEVEL 1 FIELD     

    REPKEY=REP_KEY                             REPORT KEY              

 PATH=002                                      PATH NUMBER             

 TABLE=CTD.GIRAD                               DB2 TABLE NAME          

    FIELD=(ACCOUNT,ACCOUNT,10)                 INDEX LEVEL 1 FIELD     

    FIELD=(DATE,DATE_,8)                       INDEX LEVEL 2 FIELD     

    REPKEY=REP_KEY                             REPORT KEY              

 PATH=003                                      PATH NUMBER             

 TABLE=CTD.GIRAN                               DB2 TABLE NAME          

    FIELD=(ACCOUNT,ACCOUNT,10)                 INDEX LEVEL 1 FIELD     

    FIELD=(NAME,NAME,15)                       INDEX LEVEL 2 FIELD     

    REPKEY=REP_KEY                             REPORT KEY              

 PATH=004+                                     PATH NUMBER             

 TABLE=CTD.GIRDN08                             DB2 TABLE 1 NAME          

 TABLE=CTD.GIRDN07                             DB2 TABLE 2 NAME          

 TABLE=CTD.GIRDN06                             DB2 TABLE 3 NAME          

    FIELD=(KUNDNR,KUNDNR,9)                    INDEX LEVEL 1 FIELD     

    REPKEY=REP_KEY                             REPORT KEY              

 PATH=005                                      PATH NUMBER

 TABLE=CTD.DEP_TEAM_ACCNT                      DB2 TABLE NAME

    FIELD=(DEPARTMENT,DEPARTMENT,3),CTD.DEP+   INDEX LEVEL 1 FIELD

    FIELD=(TEAM,TEAM,2),CTD.DEP_TEAM+          INDEX LEVEL 2 FIELD

    FIELD=(ACCNT,ACCOUNT,9)                    INDEX LEVEL 3 FIELD

    REPKEY=REP_KEY                             REPORT KEY

 PATH=006                                      PATH NUMBER

     FIELD=(DEPARTMENT,DEPARTMENT,3),CTD.DEP   INDEX LEVEL 1 FIELD

     FIELD=(TEAM,TEAM,2),CTD.DEP_TEAM+         INDEX LEVEL 2 FIELD

     REPKEY=REP_KEY                            REPORT KEY

 PATH=007                                      PATH NUMBER             

 TABLE=CTD.GIRJAR                              DB2 TABLE NAME          

    FIELD=(JOBNAME,JOBNAME,45)                 INDEX LEVEL 1 FIELD     

    REPKEY=REP_KEY                             REPORT KEY              

 END

Parent Topic

Creating and Maintaining the Global Index Database