Need a quick method to convert from VCAT to STOGROUP defined or do you need to consolidate extents without the REORG outage?

Document ID : KB000027566
Last Modified Date : 14/02/2018
Show Technical Document Details

Question: 

Need a quick method to convert from VCAT to STOGROUP defined or do you need to consolidate extents without the REORG outage?

Answer: 

One important issue to start thinking about is DB2 objects using VCAT defined objects as opposed to STOGROUP defined objects. These objects will have to be converted sooner or later in order to exploit some of the new features available in DB2 V8 and DB2 V9.1 for z/OS.

Another issue many DB2 users experience from time to time is related to tablespaces and indexes reaching an "out of extent" situation, or the need to consolidate extents without the outage from a Reorganization - or even move the pageset to a specific volume for performance reasons.

CA Database Analyzer offers a unique method to assist in both of these scenarios, using a high speed data movement mechanism while also taking care of the necessary catalog updates - and even more important, automatic fallback if "something goes wrong".

The steps needed to accomplish these tasks are:

    1. From the CA DB2 Products Main Menu, specify option D (Database Analyzer), and then pick option D (Dataset Facility).
    2. Specify the object type and object name and press ENTER, where after the object details are listed (volume, allocation quantities and the storage group or VCAT name.
    3. Simply overwrite what needs to be changed (e.g. the new volume, the storage group or the new primary/secondary quantity), and press ENTER.
    4. The commands to execute the change are created, so simply hit ENTER for online execution or specify B for MODE Batch.
    5. The first set of control cards illustrates PRIQTY and SECQTY has been set to 2000 and 4000 for partition 3 of tablespace SYSCOLTS in DSNDB04.The seconds set of control cards illustrates the control cards generated for converting tablespace=S0705033 from VCAT defined to STOGROUP defined.
1.   ********************************* TOP OF DATA **************************
2.   .CALL DFLMOVE INDDN(PTIIN) OUTDDN(PTIPRINT)                              
3.   .DATA                                                                    
4.               SSID(D81A) TABLESPACE(DSNDB04.SYSCOLTS) PART(3)                      
5.               VCAT(D81A)                                                           
6.               PRIQTY(2000)                                                           
7.               SECQTY(4000)                                                           
8.   .ENDDATA                                                                 
9.   .SYNC 5     'MOVE TABLESPACE(DSNDB04.SYSCOLTS) PART(3)'                  
10.  ******************************** BOTTOM OF DATA ************************
11.         
12.  ********************************* TOP OF DATA *********************************
13.  .CALL DFLMOVE INDDN(PTIIN) OUTDDN(PTIPRINT)                                     
14.  .DATA                                                                           
15.              SSID(D81A) TABLESPACE(D0705033.S0705033)                                    
16.              VCAT(D81A)                                                                  
17.              USING(SG,SYSDEFLT)                                                          
18.  .ENDDATA                                                                        
19.  .SYNC 5     'MOVE TABLESPACE(D0705033.S0705033)'                                
20.  ******************************** BOTTOM OF DATA *******************************
  1. The steps performed during the execution is (where x represents the dataset number):

    1. The object is stopped
    2. The necessary ALTER command(s) are executed so the catalog reflects the changes.
    3. IDCAMS define of a new cluster (with Node=Y000x) using the original dataset as MODEL (after making sure this VSAM dataset doesn't exist)
    4. The content of the original VSAM dataset (Node=A000x) is copied to the new dataset (Node=Y000x).
    5. The original datasets (Node=A000x) are renamed to Node=Z000x.
    6. The new datasets (Node=Y000x) are renamed to Node=A000x.
    7. What was the original datasets (Node=A000x now renamed to Node=Z000x) are then deleted.
    8. The execution is committed and the object is started again in RW mode.

The purpose of the renaming process is done in order to provide automatic fallback in case the process should fail.