Declaring User-Written Functions
To declare a user-written function, place the USERFUNCTION declaration in the rule file (usually in the START section). Once declared, the user-written function is called in the same manner as any other Enrichment rule function.
The syntax for declaring a user-written function is:
USERFUNCTION name module [language type maxin maxout buffers]
The following table describes the parameters used to declare a user-written function.
Parameter | Description | Default | |
---|---|---|---|
name | Up to 20 characters that specify a unique name for the function. | None | |
module | One of the following:
|
None | |
[language] | One of the following that specifies the language type used in the function’s subroutine: | C | |
C | IBM C/370 or SAS/C for mainframe systems or UNIX C for UNIX systems. Use C for Windows no matter which language you chose to create the DLL. | ||
ASM | IBM Assembler (Mainframe only) | ||
COB[OL] | IBM VS COBOL II (Mainframe only) | ||
[type] | One of the following interface types for the user-written function: | NORMAL | |
N[ORMAL] | One call per entry in the rule file, no initialization or termination calls. (The call type in the Input Call area is N for all calls.) | ||
E[XTENDE] | Three types of calls: I — Initialization (once after initial program load) N — Normal call (one call per entry in the rule file) T — Termination (once before final remove). |
||
[maxin] | The maximum size of the input data that will be passed to the function. The Input Call Area will be this size plus 40 bytes. 256 is the default maxin setting. | None | |
[maxout] | The maximum size of the result returned from the function. The Output Call Area will be this size plus 40 bytes. 256 is the default maxout setting. | None | |
[buffers] | One of the following that specifies the type of memory to pass to the function for the Input and Output Call Areas:
|
A |