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 EngageOne™ 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:
  • For mainframe systems, up to 8 characters that specify the actual subroutine name link-edited into its own load module of the same name.
  • For UNIX, any number of characters that specify the actual subroutine name linked as a shared object, where the entry point name is the same as the file name. The file must be in the library path.
  • For Windows, the value consists of two parts—DLL:function, where "DLL" is the name of the DLL you created and "function" is the name of the function within the DLL. If you specify only one name, it is used for both the DLL and the function.
None
[language] One of the following that specifies the language type used in the function’s subroutine: C
C IBM C/370 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 Pass memory above the 16MB line to the function.
  • B Pass memory below the 16MB line to the function.
This parameter is only available on Mainframe.
A