Create Node Group (CRTNODGRP)

The Create Node Group (CRTNODGRP) command creates a node group to be used for creating distributed database files.

Parameters

Keyword Description Choices Notes
NODGRP Node group Qualified object name Required, Positional 1
Qualifier 1: Node group Name
Qualifier 2: Library Name, *CURLIB
RDB Relational database Values (up to 32 repetitions): Character value Required, Positional 2
PTNFILE Partitioning file Qualified object name Optional
Qualifier 1: Partitioning file Name, *NONE
Qualifier 2: Library Name, *LIBL, *CURLIB
PTNMBR Partitioning member Name, *FIRST Optional
TEXT Text 'description' Character value, *BLANK Optional
AUT Authority Name, *LIBCRTAUT, *CHANGE, *ALL, *USE, *EXCLUDE Optional

Node group (NODGRP)

Specifies the node group to be created.

This is a required parameter.

Qualifier 1: Node group

name
Specify the name of the node group to be created.

Qualifier 2: Library

*CURLIB
The node group is created in the current library for the job. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library for the node group.

Relational database (RDB)

Specifies the relational databases to be included in the node group.

This is a required parameter.

character-value
Specify the name of each relational database to be used. A maximum of 18 characters can be specified for the relational database name. These must have already been defined in the system's relational database directory using the Add RDB Directory Entry (ADDRDBDIRE) command. At least two relational database names must be specified. One of the entries must correspond to the local system. All other entries must correspond to remote IBM i systems. Up to 32 relational database names may be specified.

When the node group is created, a node number is assigned for each relational database specified. Node numbers are assigned consecutively, starting with 1. The first relational database is assigned node number 1, the second database is assigned node number 2, and so on. Once the node group has been created, you can use the DSPNODGRP (Display Node Group) command to see the correspondence between node numbers and relational database names.

Partitioning file (PTNFILE)

Specifies the name of the file to be used to determine the partitioning attributes for the node group. The node group contains a table with 1024 partitions. Each partition contains a node number. The partitioning file allows you to set the node number for each of the 1024 partitions. For a complete description of the format of a partitioning file, refer to the DB2 Multisystem for IBM i book.

Qualifier 1: Partitioning file

*NONE
A partitioning file will not be used to set the partitioning attributes for the node group object. Each valid node number will be assigned to equal number of partitions. For example, if two relational databases are specified there will be two valid node numbers (1 and 2), and the partitions will be divided equally so that 512 partitions have a node number of 1 and the other 512 partitions have a node number of 2.
name
Specify the name of the partitioning file to be used.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library to be searched.

Partitioning member (PTNMBR)

Specifies the member in the partitioning file to be used to determine the partitioning attributes for the node group.

*FIRST
The first member in the partitioning file is used.
name
Specify the name of the member to be used.

Note: This parameter is not valid when *NONE is specified for the Partitioning file (PTNFILE) parameter.

Text 'description' (TEXT)

Specifies the text that briefly describes the node group.

*BLANK
Text is not specified.
character-value
Specify no more than 50 characters of text, enclosed in apostrophes.

Authority (AUT)

Specifies the authority you are giving to users who do not have specific authority for the object, who are not on an authorization list, and whose group profile or supplemental group profiles do not have specific authority for the object.

*LIBCRTAUT
The system determines the authority for the object by using the value specified for the Create authority (CRTAUT) parameter on the Create Library command (CRTLIB) for the library containing the object to be created. If the value specified for the CRTAUT parameter is changed, the new value will not affect any existing objects.
*CHANGE
The user can perform all operations on the object except those limited to the owner or controlled by object existence (*OBJEXIST) and object management (*OBJMGT) authorities. The user can change and perform basic functions on the object. *CHANGE authority provides object operational (*OBJOPR) authority and all data authority. If the object is an authorization list, the user cannot add, change, or remove users.
*ALL
The user can perform all operations except those limited to the owner or controlled by authorization list management (*AUTLMGT) authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the object.
*USE
The user can perform basic operations on the object, such as running a program or reading a file. The user cannot change the object. Use (*USE) authority provides object operational (*OBJOPR), read (*READ), and execute (*EXECUTE) authorities.
*EXCLUDE
The user cannot access the object.
name
Specify the name of an authorization list to be used for authority to the object. Users included in the authorization list are granted authority to the object as specified in the list. The authorization list must exist when the object is created.

Examples

Example 1: Creating a Group with Default Partitioning

CRTNODGRP   NODGRP(LIB1/GROUP1)
            RDB(SYSTEMA SYSTEMB SYSTEMC SYSTEMD)
            TEXT('Node group for test files')

This command creates a node group containing four nodes. The partitioning attributes default to assigning one-fourth of the partitions to each node number. This node group can be used on the NODGRP parameter of the Create Physical File (CRTPF) CL command to create a distributed file. Distributed files created specifying this node group will have their data spread across the four node systems. If the records in the distributed file contain a uniform distribution of values for those fields which comprise the partition key, the records will be spread evenly between the node systems.

Example 2: Creating a Group with Specific Partitioning

CRTNODGRP   NODGRP(LIB1/GROUP2)  RDB(SYSTEMA SYSTEMB SYSTEMC)
            PTNFILE(LIB1/PTN1)
            TEXT('Partition most of the data to SYSTEMA')

This command creates a node group containing three nodes. The partitioning attributes are taken from the file called PTN1. This file can be set up to force a higher percentage of the records (or rows) to be located on a particular system.

Error messages

*ESCAPE Messages

CPF3165
Node group &1 in library &2 could not be created.