Version 4.2.6 for Mainframes
 —  Operations  —

Assignment of Parameter Values

This document provides information on how values are assigned to profile parameters statically, dynamically and at runtime.

The following topics are covered:

For details of the individual profile parameters, refer to the Parameter Reference documentation.


Sources for Parameter Value Assignment

The values for profile parameters are taken from three sources:

  1. Static assignments
    Profile parameters specified by the macro NTPRM and other macros in the Natural parameter source module (NATPARM). These macros are then assembled and linked with the Natural nucleus. All parameters not specified are assigned their default values.

  2. Dynamic assignments
    Parameters specified for the Natural session execution. These parameters override the static assignments and are valid for the current Natural session. Dynamic parameters can be passed by a front-end program, the parameter dataset (CMPRMIN), session-initialization JCL, terminal input or Natural Security. In addition, it is possible to overwrite certain parameters by Natural program statements.

  3. Session parameters
    Parameters specified with the system command GLOBALS (or a SET GLOBALS statement, in Reporting mode) within the current Natural session. The parameters override static and dynamic assignments.

Illustration of the Natural Parameter Assignment:

Top of page

Static Assignment of Parameter Values

The Natural parameter module NATPARM is used for the static assignment of profile parameters for all Natural environments.

In the parameter module, you use the macro NTPRM, and several other macros, to specify the parameters.

All parameter settings (except the parameter CSTATIC) made in the parameter module can be overwritten dynamically at the start of a Natural session.

For technical reasons, for some profile parameters a corresponding macro is used for static assignment in the parameter module. Consequently, the syntax of the static and dynamic specifications differs slightly, taking the following general form:

Static:
MACRO-NAME KEYWORD1=value1,KEYWORD2=value2,...
Dynamic:
PARAMETER-NAME=(KEYWORD1=value1,KEYWORD2=value2,...)

Example:

If there is a corresponding macro for a profile parameter, this is indicated in the parameter description.

For more details on static assignment, see Using a Natural Parameter Module.

Some Natural subproducts (for example, Natural for DL/I or Natural for DB2) use additional parameter modules. These modules are described in the documentation of these subproducts.

Top of page

Dynamic Assignment of Parameter Values

You can specify profile parameters dynamically at the start of a Natural session to override - for the duration of a single Natural session - individual profile parameter settings of the Natural parameter module NATPARM.

Example:

NUCNAME='NATNUC#5',IM=D,INTENS=1,DU=OFF,FUSER=(10,32),PROGRAM=' ',
WORK=((1),AM=STD,DEST=WORK1,OPEN=INIT),PS=60,LS=120

All profile parameters can be specified dynamically - except CSTATIC which can be specified statically in the Natural parameter module only:

The dynamic parameter assignments are separated by (one or more) commas or blanks. If the value for a dynamic parameter contains non-alphanumeric or special characters, the value must be specified enclosed in apostrophes. Which characters are special characters is defined in the character table macro NTSCTAB of NATCONFG; see Natural Configuration Tables.

The use of dynamic parameters can be enabled/disabled by the macro NTDYNP or the corresponding dynamic profile parameter DYNPARM.

For a more comfortable specification of sets of dynamic parameters, you can use the profile parameter PROFILE or SYS. In addition, it is possible to set a number of dynamic parameters in Natural Security.

It is possible to insert comment strings within dynamic parameters. A comment starts with "/*" and ends with "*/" . If the comment string end delimiter is missing, an error message is issued during session initialization.

Example:

PARM=MYPARMS /* my comment */ ADANAME=ADALNKR,PROFILE=MYPROF 

The dynamic parameter settings are passed to Natural when the session is started. The method used for passing the parameter values to Natural varies depending on the environment.

Example for z/OS in batch mode:

Specifying Dynamic Parameters under z/VSE

The dynamic parameters can either be passed directly with a PARM specification in the JCL EXEC statement:

// EXEC NATBATCH,PARM='dynamic parameters...',SIZE=...

Or you can specify PARM='SYSRDR' to cause Natural to read the dynamic parameters from SYSRDR:

// EXEC NATBATCH,SIZE=...,PARM='SYSRDR'
dynamic parameters
...
/* END OF DYNAMIC PARAMETERS

If the PARM keyword is not specified in the JCL EXEC statement, the SYSPARM parameter of the JCL OPTION statement is checked for compatibility reasons:

...
// OPTION SYSPARM='SYSRDR'
// EXEC NATBATCH,SIZE=...
dynamic parameters
...
/* END OF DYNAMIC PARAMETERS

Top of page

Session Parameters for Runtime Assignment of Parameter Values

To some profile parameters a value can be assigned within a Natural session at runtime, using a corresponding session parameter. The session parameter value will override the profile parameter value.

If a corresponding session parameter exists for a profile parameter, this is indicated in the description of the profile parameter.

Session parameters are specified with the system command GLOBALS. Session parameters are described in the Parameter Reference documentation. Further details on system commands can be found in the Command Reference documentation.

Example:

GLOBALS SA=ON,IM=D

In reporting mode, session parameters can also be specified with the SET GLOBALS statement in a program.

Some profile parameters can also be overridden within a Natural session by a terminal command. If a corresponding terminal command exists for a profile parameter, this is indicated in the description of the profile parameter. Terminal commands are described in the Terminal Commands documentation.

Example:

SET CONTROL 'T=3279'

The value of the profile parameter TTYPE is overwritten.

Top of page