Configuration and Parameters


Configuration

General Product Configuration

Below you will find the components with which you can configure the NDZ according to your specifications.

NDZ Started Task

NDZ server started task streamlines and executes the Db2 requests remotely using JDBC and SQLJ drivers. For more information about using sample jobs to create NDZ started task in the NDZ installation, see Installing Natural for Db2 for zIIP . For information about NDZ server started task parameters, see NDZ started task procedure.

NDZ server supports Language Environment (LE). For details about the LE runtime options and recommended options for the NDZ server, see Language Environment Runtime Options for NDZ Server.

NDZ Configuration

You specify Natural for Db2 for zIIP (NDZ) parameters in the ndz.properties present in the /etc directory to configure NDZ. These parameters control the properties of NDZ started task and the client related configurations of NDZ. For detailed information about the NDZ parameters, refer to NDZ configuration file (ndz.properties).

Setting Environment Variables

The <NDZ-directory>/bin/setenv.sh script is used in the other scripts and batch jobs for static preparation to set the required environment variables. NDZ builds the environment variables like CLASS_PATH and LIB_PATH based on the parameters supplied by you. For detailed information about the parameters to specify in the setenv.sh script, refer to the section NDZ USS environment configuration file (setenv.sh).

Db2 Configuration

Natural for Db2 for zIIP (NDZ) requires Db2 related information to connect to Db2 and modify Db2, JDBC and SQLJ driver properties. You can add these parameters in db2.properties. To know more about parameters required for Db2 configuration, refer to Db2 configuration file (db2.properties). Other than the parameters mentioned in the section, you can also specify JDBC and SQLJ properties in the Db2 configuration file.

Db2 Password Encryption

Natural for Db2 for zIIP provides a password encryption mechanism to safely encrypt your password using encryption keys.

You need to generate an encryption key, and this key is used to encrypt the password. You can generate the key and encrypt the password using the script <NDZ home directory>/bin/ndz-db2-pass.sh.

Execute the following script and enter the Db2 connection password when prompted:

<NDZ home directory>/bin/ndz-db2-pass.sh

Options:

-g To generate the key file.

Use the option –g when you generate the key file or change the existing encryption key.

Example:

ndz-db2-pass.sh -g 

This option -g should be used when you execute the script for the first time to generate an encryption key file.

However, if you want to change the password without changing the key file, execute the script without option -g.

Example:

ndz-db2-pass.sh

Note:

If your Db2 connection password is encrypted, the password parameter in the db2.properties will be ignored.
If your Db2 connection password is not encrypted, you will receive a warning message when you start the NDZ server.

Message:

WARNING - Db2 encrypted password is not available at <NDZ home directory/var>. Using password from db2.properties

Parameters

NDZ Started Task Procedure

You specify the following parameter for the NDZ started task procedure.

Parameter name Mandatory Description
PATH Y The home directory where the NDZ files were installed in Unix System Services (USS).

Example:

//NDZ11 EXEC PGM=NDZNUC11,REGION=0M,
//PARM=('PATH=/u/nat/ndz/dev/ndz11') 

Language Environment Runtime Options for NDZ Server

This section describes the Language Environment (LE) runtime options and recommended options for the NDZ server.

The LE options you specify depend on the site specifications and the workload executed on the NDZ Server. You can determine the optimal values for your site from the reference values in the report on memory usage by the NDZ Server. To retrieve the report, set the options RPTOPTS(ON) and RPTSTG(ON).

You only need to use RPTOPTS and RPTSTG to retrieve the report and set the LE options in NDZ Server.

After you set the LE runtime options, set RPTOPTS(OFF) and RPTSTG(OFF) as these options increase the time to complete the task.

LE Runtime Options for NDZ Server
Option Description
HEAP64 Controls the allocation of the user heap.
HEAPPOOLS64 Specifies that the (Quick) heap storage manager can be used to manage user heap storage above the 2G bar.
IOHEAP64 Controls the allocation of the I/O heap storage.
LIBHEAP64 Controls the allocation of the library heap storage.
STACK64 Controls the allocation and management of the stack storage.
STORAGE Controls the contents of storage that is allocated and freed.
THREADSTACK64 Controls the allocation of the thread-level stack storage for both the upward and downward growing stack.

You set the LE runtime options in NDZ server started task by specifying them under DDNAME CEEOPTS, for example:

//CEEOPTS  DD  *
ENVAR("LIBPATH=&LP1.&LP2.&LP3."),POSIX(ON),
HEAP64(100M,1M,KEEP,209785904,32768,KEEP,0,4096,FREE),
LIBHEAP64(1M,1M,FREE,8192,8192,FREE,0,4096,FREE),
IOHEAP64(1M,1M,FREE,40960,8192,FREE,4096,4096,FREE)

In addition to the specified runtime options, you can set all other options to site-specific values.

Db2 Configuration File (db2.properties)

You specify the following parameters for Natural for Db2 for zIIP (NDZ) to connect to Db2 and to perform SQL operations.

Parameter name Mandatory Description
user Y Userid to connect to Db2. Note that the user should have required access on Db2 to perform required SQL operations. This is a mandatory parameter.
password Y

Password for the Db2 user mentioned above. Note that you can encrypt the password using NDZ Db2 password encryption capability, be aware that this is the recommended method to store your password. If you do not have an encrypted password, you can mention the password here. However, it is recommended to encrypt your password using NDZ Db2 password encryption.

databaseName Y Db2 database location name to connect to the specific Db2 system. Example – DAEFDB2D. This is a mandatory parameter.
serverName Y Fully qualified domain address of the z/OS system you need to connect. This is a mandatory parameter.
portNumber Y TCP/IP port number that identifies the specific Db2 subsystem. This is a mandatory parameter.
statementConcentrator N (recommended) Suggested setting: statementConcentrator=1.

When statementConcentrator is not set (statementConcentrator=0) or is enabled (statementConcentrator=2), a MERGE statement containing the FOR n ROWS clause will fail with the SQLCODE -20186. Therefore, it is strongly recommended to set this parameter to "off" (statementConcentrator=1). See also Restrictions Related to Dynamic Execution.

For more details, refer to the Db2 for z/OS Application Programming Guide and Reference for Java manual.

useRowsetCursor / enableRowsetSupport N (recommended) Suggested setting: useRowsetCursor=false.

To execute statements with the WHERE CURRENT OF clause, rowset support must be disabled. This can be achieved by setting the properties useRowSetCursor=false and/or enableRowsetSupport=1. Any of them or both can be used. See also Restrictions Related to Dynamic Execution

When rowset support is enabled and a statement containing the WHERE CURRENT OF clause is executed, NDZ will return the error 606. See Error Codes for details.

You can also set the IBM JDBC and SQLJ properties by specifying the properties in db2.properties file. Refer to Application Programming Guide and Reference for Java related to different JDBC and SQLJ properties.

NDZ Configuration File (ndz.properties)

You specify the following parameters to configure the NDZ server instance.

Parameter name Mandatory Description
java.home Y The Java JDK installation directory.
db2.home Y The Db2 installation directory which contains licenses, JDBC and SQLJ drivers.
ndz.maxClients Y The maximum number of clients that can connect simultaneously to NDZ server to execute Db2 requests. Accepted values are 1-999.
ndz.initDb2Connection Y Number of initial connections to Db2.
ndz.bufferLentgh   Length of the client buffer in MB. Accepted values are 1-5000.
ndz.staticPath Y Path(s) for the static profiles. During the static preparation, serialized profiles are generated in the directory mentioned in this parameter. The profiles in the static path are used during the runtime to execute the SQL statements statically.
ndz.automaticProfileReload N Specifies if static profiles cache will be reloaded when changes occur in the directory specified in the ndz.staticPath. Possible values are true/false. The default value is false. When it is set to true, there is an additional CPU consumption to monitor the directory for any changes and reload the static profiles. If the value is set to false, you can reload static profiles using modify command R.
ndz.retryCount N Specifies the number of attempts to check for new requests before NDZ client tasks switch to wait state. The performance of NDZ client applications can be improved when the task processing the requests run continuously, avoiding context switches. This behavior is in effect only when this property is set to a value different than zero. The default value is 0.
ndz.redispatchCount N Specifies after how many retry attempts (property ndz.retryCount) the NDZ client task will yield its use of the processor to other tasks. Setting this property can improve the performance of NDZ, avoiding over-utilization of the CPU. This behavior is in effect only when this property and ndz.retryCount are set to values different than zero. The default value is 0.

NDZ USS Environment Configuration File (setenv.sh)

The following are the parameters needed for the Natural for Db2 for zIIP (NDZ) to set the environment variables.

Parameter name Mandatory Description
DB2_HOME Y Update the Db2 installation directory which contains licenses, JDBC and SQLJ drivers. (Ex - /usr/lpp/db2vrs)
JAVA_HOME Y Update the Java JDK installation directory (Ex - /usr/lpp/java/Jvrs)
NDZ_HOME Y NDZ installation directory path where NDZ files are present.

On this page