CICS VSAM Transparency for z/OS, Version 1.2


DB2 primary key for an RRDS data set

The DB2® table definition that is used for a migrated RRDS data set is shown in Figure 1 . It uses the sample copybook shown in Figure 2 except that in this case the VSAM data set is an RRDS:

Figure 1. DB2 DDL for an RRDS data set table
 CREATE TABLE VID_ITEM
   (RRN_NUMBER            INTEGER    
   ,ITEM_NUMBER                CHAR(6)
   ,ITEM_NAME                  CHAR(12)
   ,ITEM_COLOUR                CHAR(6)
   ,ITEM_WEIGHT                CHAR(4)
   ,ITEM_COST                  DEC(7,2)
   ,ITEM_REORDER_NO            SMALLINT
   ,ITEM_SUPP_CODE             CHAR(3)
   ,ITEM_DATE_FSHIP            DATE
   ,ITEM_SHELF_LIFE            CHAR(2)
   ,ITEM_DESCRIPTION           CHAR(35)  
   (PRIMARY KEY(RRN_NUMBER))
    IN ITEMDB.ITEMTS;   

The column RRN_NUMBER is defined as the DB2 primary key. The name of this column is optional, but to map an RRDS data set you must have an INTEGER column as the primary key of the DB2 table.





Last updated: December 6, 2013 20:43:15

Information Information

Feedback


Timestamp icon Last updated: Friday, 6 December 2013


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic///topics/cvtug_primarykey_rrds.html