LRF Considerations for User-Defined Built-In Functions

If a site-defined built-in function is used with the Logical Record Facility (LRF) WHERE clause, the function must check each parameter to determine if the record containing the parameter value has been read by LRF processing. If the value has been read, the parameter is considered valued. If the value has not yet been read, the parameter is nonvalued.
idmscu
If a site-defined built-in function is used with the Logical Record Facility (LRF) WHERE clause, the function must check each parameter to determine if the record containing the parameter value has been read by LRF processing. If the value has been read, the parameter is considered
valued
. If the value has not yet been read, the parameter is
nonvalued
.
A parameter is checked for being nonvalued by examining its associated XDE and VXDE. The exact checks that need to be made depend on whether a parameter is optional or required for that particular built-in function. The following considerations apply:
  • If a parameter is optional
    , it is nonvalued if VXDEFNVL is ON, or if XDEFNVL is ON and XDEDATAD is not equal to X'80000000'.
  • If a parameter is required
    , it is nonvalued if either of its XDEFNVL or VXDEFNVL bits is ON.
If any parameter is nonvalued, the built-in function must react accordingly. The proper action to take depends on the function being performed and which parameter is nonvalued. In most cases, the built-in function will return a nonvalued result by setting the VXDEFNVL flag in the result VXDE.