Output Call Area
The Output Call area is a memory block used to pass the result string from the user-written function back to EngageOne™ Enrichment. The size of this memory block is set with the maxout parameter of the USERFUNCTION declaration. (For more information about USERFUNCTION, refer to Declaring User-Written Functions.)
The layout of the Output Call area is described in the following table.
Name | Type | Size | Offset | Description |
---|---|---|---|---|
OutSig | CHAR | 4 | 0 | Output signature, set to “PDRO” by EngageOne™ Enrichment |
RC | INT | 4 | 4 | Result Return Code (initially set to -99) |
RV | INT | 4 | 8 | Result Return Value (initially set to -99) |
future | CHAR | 24 | 12 | Reserved |
OutSize | INT | 4 | 36 | Size of output data (initially set to 0; must be set less than or equal to maxout) |
OutData | CHAR | n | 40 | Output data (initially blanked for maxout characters). The user-written function can define multiple fields within this data for ease in processing. The rule file could then retrieve these multiple values using the SUBSTR or RGET functions. |
Hints
- EngageOne™ Enrichment sets OutSig in the Output Call Area to be checked (not changed) by the user-written function.
- EngageOne™ Enrichment initializes RC and RV in the Output Call Area to -99. The user-written function should set them to 0 or another valid return code if successful. If RC or RV is still -99 after the user-written function is called, EngageOne™ Enrichment assumes that the function did not run and issues a severe error.
- On mainframe, EngageOne™ Enrichment checks Register 15 (R15) after the call to the user-written function. R15 should always be 0 if the user-written function ran, even if there was a problem. Use RC and RV in the Output Call Area for normal return codes. If R15 is non-zero, EngageOne™ Enrichment issues a severe error.
- For extended user-written functions, the initialization and termination calls (call types I and T) do not set InSize or InData and do not use OutSize or OutData. If the user-written function returns anything other than a 0 in the Output Call Area RC or RV, EngageOne™ Enrichment assumes the initialization/termination failed. If the RC is between 1 and 7, EngageOne™ Enrichment issues a warning. Otherwise, EngageOne™ Enrichment issues a severe error.
- For multiple calls to the same user-written function (that is, functions referenced multiple places within the rule file), the initialization/termination only occurs once. All calls must specify the same language, type, maxin, and maxout values.