CL Command Reference - CHGNODGRPA

CL Command List > CHGNODGRPA Reference

Description:

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 CRTNODGRP (Create Node Group) command. You can use the DSPNODGRP (Display Node Group) command to see the valid node number values and correspondence between node numbers and relational database names.

This command does not affect existing distributed files that were created using the specified node group. Distributed files created after the node group is changed will use the changed partitioning attributes.

. You can create a database file as a distributed file by specifying values for the NODGRP and PTNKEY parameters on the CRTPF (Create Physical File) command.

. For an existing database physical file that is not a distributed file, you can make the file distributed by specifying values for the NODGRP and PTNKEY parameters on the CHGPF (Change Physical File) command.

. For an existing distributed database file, you can change the data partitioning attributes by specifying values for the NODGRP and PTNKEY parameters on the CHGPF (Change Physical File) command. This will cause the data to be redistributed according to the partitioning table in the node group.




Examples:

Example 1: Specify a Partition Number

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

This command changes the partitioning attributes of the node group named GROUP1 in library LIB1. Partition 1019 is changed to refer to node number 2. Node number 2 corresponds to the second relational database specified when the node group was created (RDB parameter on the CRTNODGRP command).



Example 2: Specify a Comparison Value

CHGNODGRPA NODGRP(GROUP2) CMPDTA(¡¯CHICAGO¡¯) NODNBR(3)

This command 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 CMPDTA parameter is hashed, and the resulting partition number is changed from its existing node number to node number 3.