RC/Compare ICL alter tablespace generates DROP and CREATE instead of expected ALTER statements
search cancel

RC/Compare ICL alter tablespace generates DROP and CREATE instead of expected ALTER statements

book

Article ID: 270772

calendar_today

Updated On:

Products

RC/Migrator for DB2 for z/OS RC Compare for DB2 for z/OS

Issue/Introduction

Making changes to production environment and have a well defined process that compares the QA environment to PROD and generates the the ICL which is analyzed to get the executable script.

Expected to see ALTER TABLESPACE statements for the following change but instead see the UNLOAD/DROP/CREATE scenario for the following ICL:

   ALTER TABLESPACE dbname.tsname      
         PARTED     YES                    
         TYPE G                            
         MAXPARTITIONS   10                
         DSSIZE   64G                      
         ALTER PART       1                
               COMPRESS   NO               
   ;                                       

Resolution

During the analysis step to perform the ICL to DDL analysis global changes are included (these are the cards in the PARMFILE DD starting with ALCR and ending with RTSC).

The TSCR global change is causing the UNLOAD|DROP/CREATE|LOAD changing the creator for the tablespace. To make this change, RC/Migrator is generating
a DROP/CREATE and generates the SET CURRENT SQLID = 'userid'; before the CREATE TABLESPACE statement. 


The following was also noted in the ICL Analysis output supporting the above:

--  Tablespace changes for:                                          
--  DB Name: dbname                                               
--  TS Name: tsname                                                
--                                                                   
--  Attribute   Status        Value                                  
--  ---------   -----------   ----+----1----+----2----+----3--       
--  CREATOR     Currently:    user1                                
--                     Changed To:   user2             
                  

Removed the TSCR global change card and expected ALTER statements were generated.