RI/Manager : Determine details of columns used in RI between two tables.
search cancel

RI/Manager : Determine details of columns used in RI between two tables.

book

Article ID: 59148

calendar_today

Updated On:

Products

RI Manager for DB2 for z/OS RC/Extract for DB2 for z/OS

Issue/Introduction

When working with tools like RC/Extract , it is important to understand the RI structure that the product is working with. Obtaining this info out of the catalog could be time consuming.

 

Environment

Release: R20
Component: PRI

Resolution

RI/Manager has a simple line command that can display this information quickly.

When the table is listed in RI Manager.....and the "L" line command is used.

nn.n   --------------- RI Manager Relationship Sets Management ---------------
Command ===>                                                  Scroll ===> CSR

Specify Named Relationship Set Filter Criteria:
DB2 SSID ==> ssid                     Include NRS ==> Y        RI only ==> N
Tbl Name ==> TABLE%                       Creator ==> authid    >
  Nrs Name ==>                              Creator ==>            Share ==> A

Cm   Name                             Creator  Sh +---- NRS Last Update -----+
 + -ssid:authid:TABLE1
 + -ssid:authid:TABLE_UTS_PBR7_RE>

Expand the first NRS with an L line command.

nn.n   --------------- RI Manager Relationship Sets Management ---------------
Command ===>                                                  Scroll ===> CSR

Specify Named Relationship Set Filter Criteria:
DB2 SSID ==> ssid                     Include NRS ==> Y        RI only ==> N
Tbl Name ==> TABLE%                       Creator ==> authid    >
  Nrs Name ==>                              Creator ==>            Share ==> A

Cm   Name                             Creator  Sh +---- NRS Last Update -----+
 - -ssid:authid:TABLE1
   Desc: Catalog derived relationship set                      Lvl RI Status
    1 authid.TABLE1                                           1
    2 authid.TABLE2                                           2 U    A
 + -ssid:authid:TABLE_UTS_PBR7_RE>
Place an "L" meaning "list" line command on the table above to see the columns:

nn.n   --------------- RI Manager Relationship Sets Management ---------------
Command ===>                                                  Scroll ===> CSR

Specify Named Relationship Set Filter Criteria:
DB2 SSID ==> ssid                     Include NRS ==> Y        RI only ==> N
Tbl Name ==> TABLE%                       Creator ==> authid    >
  Nrs Name ==>                              Creator ==>            Share ==> A

Cm   Name                             Creator  Sh +---- NRS Last Update -----+
 - -ssid:authid:TABLE1
   Desc: Catalog derived relationship set                      Lvl RI Status
    1 authid.TABLE1                                           1
L     2 authid.TABLE2                                           2 U    A
 + -ssid:authid:TABLE_UTS_PBR7_RE>
The display shows the columns of the relationship and how they are matched:
               RI Manager List Key Columns

 Command ===>

Table  => TABLE2              > Creator => authid   >
Parent => TABLE1              > Creator => authid   >
 Constraint name => COLUMN1                           >

 Child Columns      ## Parent Columns     ##
 ------------------ -- ------------------ --
 COLUMN1            1  COLUMN1            1
 **************** BOTTOM OF DATA *****************
This shows not just the two tables and the constraint name but also the columns and the column number. This information is also very important when new records are to be loaded to the child table.

Additional Information

View RI Relationships