USERFUNCTION
Declares a user-written function to EngageOne™ Enrichment. It is usually placed in the START section of the rule file. Once defined, the user-written function is called like any other EngageOne™ Enrichment rule function.
Syntax
USERFUNCTION name module [language type maxin maxout buffers]
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 | IBM C/370 or SAS/C for mainframe systems, or UNIX C for UNIX systems. Use C for Windows no matter which language you used to create the DLL. | ||
ASM | IBM Assembler (mainframe only) | ||
COB | IBM VS COBOL II (mainframe only) | C | |
[type] | The user-written function interface type, one of the following: | 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[XTENDED] | Three types of call: 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 | |
[maxout] | The maximum size of the result returned from the function. The Output Call Area will be this size plus 40 bytes. | 256 | |
[buffers] | One of the following that specifies the type of memory to pass to the function for the Input and Output Call Areas:
|
A |
Calling a User-Written Function
The syntax for calling a user-written function in an EngageOne™ Enrichment rule file is:
%%Ans = Name(%%IN_VAR)
Parameter | Description |
---|---|
%%Ans | A variable whose value is the result of the call to the user-written function. |
Name | The user-written function name. This must be identical to the name value in the USERFUNCTION command used to define the function to EngageOne™ Enrichment. |
%%IN_VAR | The variable or constant string to store into InData in the Input Call Area (that is, the data the user-written function will use as input). |
For more information, see the EngageOne™ Enrichment Developer Guide.