How IRXINIT determines what values to use for the environment
IRXINIT first determines the values to use to initialize the environment. After all of the values are determined, IRXINIT initializes the new environment using the values.
On the call to IRXINIT, you can pass parameters that define the environment in two ways. You can specify the name of a parameters module (a load module) that contains the values IRXINIT uses to initialize the environment. In addition to the parameters module, you can also pass an address of an area in storage that contains the parameters. This area in storage is called an in-storage parameter list and the parameters it contains are equivalent to the parameters in the parameters module.
The two methods of passing parameter values give you flexibility when calling IRXINIT. You can store the values on disk or build the parameter structure in storage dynamically. The format of the parameters module and the in-storage parameter list is the same. You can pass a value for the same parameter in both the parameters module and the in-storage parameter list.
When IRXINIT computes what values to use to initialize the environment, IRXINIT takes values from four sources using the following hierarchical search order:
- The in-storage list of parameters that you pass on the call.
If you pass an in-storage parameter list and the value in the list is not null, IRXINIT uses this value. Otherwise, IRXINIT continues.
- The parameters module, the name of which you pass on the call.
If you pass a parameters module and the value in the module is not null, IRXINIT uses this value. Otherwise, IRXINIT continues.
- The previous environment.
IRXINIT copies the value from the previous environment.
- The IRXPARMS parameters module if a previous environment does not exist.
- A character string is null if it either contains only blanks or has a length of zero
- An address is null if its value is 0 (or X'80000000', when specified for the user field parameter in the IRXINIT parameter list)
- A binary number is null if it has the value X'80000000'
- A given bit is null if its corresponding mask is 0.
On the call to IRXINIT, if the address of the in-storage parameter list is 0, all values in the list are defined as null. Similarly, if the name of the parameters module is blank, all values in the parameters module are defined as null.
You need not specify a value for every parameter in the parameters module or the in-storage parameter list. If you do not specify a value, IRXINIT uses the value defined for the previous environment. You need only specify the parameters whose values you want to be different from the previous environment.