When a table with an identity column is dropped and re-created during a RC/Compare for Db2 for z/OS (RCC) comparison,
the original table definition remains intact (including the original starting value for the column).
However, this process might lead to duplicate rows when additional rows need to be inserted.
To avoid potential conflicts with duplicate identity column rows, we provide a Stored Procedure (RMRTPE).
In order to use RMRTPE it is necessary to add 2 steps to your @DEFAULT utility model.
The steps are: GETIDENT and SAVIDENT
1. Access Utility Model Services (Option 6) from the Profile (Option 0) under RC/Migrator.
2. Place a 'U' next to the @DEFAULT model and a list of the utilities will display
3. Insert a line with an 'I' in the CMD option and then type GETIDENT for the Utility name, 'T' for the Object, provide a description and RPI for the Size and then press Enter.
4. Place an 'E' next to GETIDENT to edit the utility and then Copy/Paste in the code for the GETIDENT process provided in the Post Install Tailor Process - Product Customization
for RCM (provided below).
#IF(%SQLPOSB)
.CALL PROCEDURE PTI.RMRTPE
.DATA
GETIDCOLS %CREATOR %OBJECT %DSNQUAL2..%DSNQUAL3
.ENDDATA
#ENDIF
5. Insert a second line with an 'I' in the CMD option and then type SAVIDENT for the Utility name, 'T' for the Object, provide a description and RPI for the Size and then press Enter.
6. Place an 'E' next to SAVIDENT to edit the utility and then Copy/Paste in the code for the SAVIDENT process provided in the Post Install Tailor Process - Product Customization for
RCM (provided below).
#IF(%SQLPOSA)
.CALL PROCEDURE PTI.RMRTPE
.DATA
PUTIDCOLS %CREATOR %OBJECT %DSNQUAL2..%DSNQUAL3
.ENDDATA
#ENDIF
Press PF3 to save the changes.
Now GETIDENT and SAVIDENT will be included in the model utilities within the @DEFAULT model:
CMD SYM UTILITY OB DESCRIPTION SIZE + USER DATE TIME
_ N GETIDENT T IDENTITY COL-RMRTPE RPI USER01 16/01/19 16:54
_ X LOAD T LOAD TABLE RPI USER01 15/12/10 15:05
_ D RUNSTATS TS RUNSTATS RPI USER01 15/12/10 15:05
_ N SAVIDENT T IDENTITY COL-RMRTPE RPI USER01 16/01/19 16:55
The Post Install task for RC/Migrator for Db2 for z/OS (RCM) contains details for creating RMRTPE, these are in highlvl.CDBASAMP(RCMCUST).