PRIQTY and SECQTY values missing within RC/Migrator
search cancel

PRIQTY and SECQTY values missing within RC/Migrator

book

Article ID: 109989

calendar_today

Updated On:

Products

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

Issue/Introduction

When objects are created in Db2 the specified defaults are used as the initial attribute values when created, templated, or altered.
If no definitions exist when an object is created, defaults are typically aligned with the values that are used by Db2.

In an RC/Migrator for Db2 for z/OS (RCM) COMPARE strategy comparing DDL for a new tablespace that
has PRIQTY/SECQTY = -1, the PRIQTY and SECQTY syntax are not generated in the resulting DDL. 

Environment

Release: r20
Component: RC/Migrator for Db2 for z/OS

Cause

Objects are created with specified defaults for PRIQTY and SECQTY as the initial attribute values when created.

Resolution

This is working as designed. If you do not specify PRIQTY or specify PRIQTY -1, Db2 uses a default value for the primary space allocation.
Unlike RC/Query for Db2 for z/OS (RCQ), RCM will try to condense the DDL and in this case there is no need for PRIQTY.
If you need to change PRIQTY/SECQTY to a specific value you should use Global Changes.

When objects with the generated DDL (with no PRIQTY/SECQTY) are executed in Db2, later examination of the catalog records
for the objects in SYSTABLEPART and SYSINDEXPART will show the value of PRIQTY and SECQTY are set to -1 by Db2.

If you need to change PRIQTY/SECQTY that is allocated you should use Global Changes during the compare strategy to set the
value in the generated analysis output but note that Global Changes in a compare only works on UNMATCHED SOURCE objects. 

In this example any source value (also -1) is changed to 12 and DDL contains PRIQTY 12 and SECQTY 12 for tablespaces and
you can do this for indexes also with IXPQ and IXSQ.

TSPQ _ PRIMARY QUANTITY * CALC(12)
TSSQ _ SECONDARY QUANTITY * CALC(12)

Example input DDL with -1 in primary and secondary quantity:

CREATE TABLESPACE TBSROLE
       IN DBCORP
                 USING STOGROUP SYSDEFLT
                               PRIQTY -1
                               SECQTY -1
       ERASE NO
       FREEPAGE 0
       PCTFREE 5
       BUFFERPOOL BP0
       LOCKSIZE ANY
       CLOSE NO
       SEGSIZE 64
       LOCKMAX 0
       CCSID EBCDIC
;


Generated DDL without Global changes being used.

CREATE  TABLESPACE TBSROLE
        IN DBCORP
                   USING STOGROUP SYSDEFLT  <------no PRIQTY or SECQTY generated !
           ERASE NO
           FREEPAGE 0
           PCTFREE 5
           BUFFERPOOL BP0
           LOCKSIZE ANY
           CLOSE NO
           SEGSIZE 64
           LOCKMAX 0
           CCSID EBCDIC
    ;

With Global changes as above:

CREATE TABLESPACE TBSROLE
       IN DBCORP
                 USING STOGROUP SYSDEFLT
                             PRIQTY 12
                             SECQTY 12
     ERASE NO
       FREEPAGE 0
       PCTFREE 5
       BUFFERPOOL BP0
       LOCKSIZE ANY
       CLOSE NO
       SEGSIZE 64
       LOCKMAX 0
       CCSID EBCDIC
;

Additional Information

Global Change Services

Define Defaults for DB2 Object Attributes