PARMEXIT
The PARMEXIT option controls whether or not the PARMEXIT facility can be used. To enable the PARMEXIT facility, specify PARMEXIT. The default is not to specify PARMEXIT, and consequently to disable this facility.
The PARMEXIT facility provides a means of dynamically modifying PARM values based on conditions at execution time, and requires a user-written program/routine.
The PARMEXIT routine must follow standard IBM linkage conventions. When the routine is entered, register 13 contains the address of a save area that can be used, register 14 contains the address that must be returned to, and register 15 contains the entry point address to the exit. The routine must save registers 2 through 14, and must restore them before control is returned to MFX. No parameter list is passed to the routine.
The routine must pass a return code in register 15: if a PARM is being passed to MFX, the return code must be 0; otherwise, 4. If the routine is passing a PARM field to MFX, a standard parameter list must be created, and the address of a pointer to the PARM field must be loaded into register 1. The four-byte pointer must contain a 1 in the high-order bit and the address of the PARM field in the remaining low-order 31 bits. The first two bytes of the PARM field contain the length of the PARM field (excluding the two-byte length field); the remainder contains text of the same parameters that might otherwise be coded in the PARM field of an MFX EXEC statement. Leading and trailing blanks are permitted in the text; embedded blanks are not. The PARM field passed back to MFX cannot exceed 256 bytes.
Below is an illustration of the format of the PARMEXIT parameter list.
The routine should be written as reentrant, assembled, and link-edited with the RENT option into the main MFX load module library with the load module name of $ORTPARM. The name $ORTPARM may be changed with the PARMNME option.
The parameters passed through the PARMEXIT facility take precedence over the PARM field of the EXEC statement and the parameter list for a program-initiated sort. Parameters presented by means of the $ORTPARM DD statement take precedence over PARMEXIT PARM values.
The PARMEXIT and PARMTABLE facilities are mutually exclusive. If both are specified, only PARMTABLE will be processed.