Change Node Group Attributes command

 

The Change Node Group Attributes (CHGNODGRPA) command changes the data partitioning attributes for a node group.

The node group contains a table with 1024 partitions; each partition contains a node number. Node numbers were assigned when the node group was created and correspond to the relational databases specified on the RDB parameter of the Create Node Group (CRTNODGRP) command. Use the Display Node Group (DSPNODGRP) command to see the valid node number values and the correlation between node numbers and relational database names.

The CHGNODGRPA command does not affect any existing distributed files that were created using the specified node group. For the changed node group to be used, the changed node group must be specified either when creating a new file or on the Change Physical File (CHGPF) command. You can find complete details on the CHGNODGRPA command in the Control Language topic in the Information Center. This first example shows how to change the partitioning attributes of the node group named GROUP1 in library LIB1:

CHGNODGRPA NODGRP(LIB1/GROUP1) PTNNBR(1019)
           NODNBR(2)

In this example, the partition number 1019 is specified, and any records that hash to 1019 are written to node number 2. This provides a method for directing specific partition numbers to specific nodes within a node group. The second example changes the partitioning attributes of the node group named GROUP2. (GROUP2 is found by using the library search list, *LIBL.) The value specified on the comparison data value (CMPDTA) parameter is hashed, and the resulting partition number is changed from its existing node number to node number 3. (Hashing and partitioning are discussed in Partitioning with DB2® Multisystem.)

CHGNODGRPA NODGRP(GROUP2) CMPDTA('CHICAGO')
           NODNBR(3)

Any files that are created using this node group and that have a partitioning key consisting of a character field store records that contain 'CHICAGO' in the partitioning key on node number 3. To allow for files with multiple fields in the partitioning key, you can specify up to 300 values on the compare data (CMPDTA) parameter.

When you enter values on the CMPDTA parameter, you should be aware that the character data is case-sensitive. This means that 'Chicago' and 'CHICAGO' do not result in the same partition number. Numeric data should be entered only as numeric digits; do not use a decimal point, leading zeros, or following zeros.

All values are hashed to obtain a partition number, which is then associated with the node number that is specified on the node number (NODNBR) parameter. The text of the completion message, CPC3207, shows the partition number that was changed. Be aware that by issuing the CHGNODGRPA command many times and for many different values that you increase the chance of changing the same partition number twice. If this occurs, the node number that is specified on the most recent change is in effect for the node group.

 

Parent topic:

Node groups with DB2 Multisystem: Overview

 

Related concepts


Create Node Group command
Partitioning with DB2 Multisystem
Customizing data distribution with DB2 Multisystem

 

Related reference


Control language