Data Transformation Engine Functions and Expressions Reference Guide
Chapter 3 - Function Reference EXIT
Functions and Expressions Reference Guide
100
EXIT
The EXIT function allows you to interface with a function in an external library or
application.
Depending on the execution platform, there are two different methods for the
EXIT function.
Syntax
EXIT (single-text-expression, single-text-expression,
single-text-expression)
Meaning 1 - Library Method
EXIT (library_name, function_name, input_to_the_function)
At runtime, the function_name function will execute in the library specified by
library_name passing input_to_the_function as a text string. The result of
function_name is returned as a text item via lpep->lpdataFromApp.
Note Under AIX, the shared library which contains library_function must also contain
an entry_point function. The entry_point function must be prototyped in the same
manner as library_function. The server will invoke the entry_point function
BEFORE invoking library_function. The server passes the name of the
library_function to the entry_point function by way of the szFile EXITPARAM
structure member. The entry_point function must then determine the address of
the library_function and pass this address back to the server by way of the lpv
EXITPARAM structure member. The server will then use the contents of lpv as an
address to invoke the library_function.
The following example depicts a shared library called mcshex.so which contains
the entry_point function and the library_function.
#include <stdio.h>
#include <string.h>
#include "/home2/parnao/TR6029/aix42/mercmapr/runmerc.h"
void AIXEntry(LPEXITPARAM);
void bin2hex(LPEXITPARAM);