Steps for Generating a User-Defined Built-In Function
An installation can generate a user-defined function by following the instructions listed below in any order:
idmscu
An installation can generate a user-defined function by following the instructions listed below in any order:
- Create a processing program module, as follows:
- Create the source module --For guidance, see the source module RHDCEV01 which contains some of the source code for the CA ADS supplied built-in functions.Processing logic for several functions can be included in one processing program module, thereby reducing the number of modules that must be loaded at runtime. Each function is distinguished by a unique function number. The function number is defined in the model XDE module by the FUNCNBR parameter of the #EFUNMOD TYPE=HDR macro. At runtime, the function number is contained in the XDEUFUNC field of the function XDE, and can be used by the processing program module to branch to the appropriate processing program.If an optional parameter is omitted, the runtime system passes a dummy operand VDE/VXDE to the built-in function for the omitted parameter. The dummy XDE/VXDE for the parameter has the following characteristics, for which a built-in function can test:A built-in function that supports entry of optional parameters must be able to determine at execution time whether the optional parameters have been entered. To do this, the built-in function must perform a runtime check of the XDE/VXDE for each such parameter.
- The XDEFNVL bit in the XDEFLAG field is set to 1.
- The XDEDATAD field is set to X'80000000'.
- Assemble the processing program source module.
- Link edit the module into the load library.
- Add the program at system generation with the PROGRAM statement.
- Create a model XDE module, as follows:
- Create the source module --The source module consists of #EFUNMOD macros. For guidance, see RHDCEV51, RHDCEV52, RHDCEV53, RHDCEV59, and RHDCEV60, the model XDE source modules for the CA ADS supplied built-in functions.
- Assemble the source module.
- Link edit the module into the load library.
- Update the master function tableby following the steps described under Changing Invocation Names.