KB Article #43988

How to implement XFB.Gateway Perl Exit Interface

Problem

How to implement Perl exits (beforebegin.pl, afterbegin.pl, afterend.pl, xfermonitor.pl, exitpcnx.pl)


Resolution

On Windows, the steps are as follows:

1. Open a command prompt window

2. CD <xfb-home-dir>\run_time\etc

3. Edit userprof.bat, and add the following line:

set p_perldll=your-Perl-dll

For a typical Win32 ActivePerl, the DLL should be c:\perl\bin\perl58.dll. Make sure that the directory where the Perl DLL is located is in the execution PATH.

4. Stop and restart XFB Gateway for the new parameters to take effect.



On Unix:

1. Make sure XFB Gateway is stopped.

2. Add this line to the <xfb-home-dir>/run_time/etc/profile file:

export p_perldll=value

where value is the absolute path to the libgatewayperlstub library included in XFB.Gateway. (In older versions of Gateway, it is called libperlstub.) This will be in the <xfb-home-dir>/obj directory, and its extension will vary by platform. For example, on Linux and Solaris, the line would be:

export p_perldll=/my/gateway/obj/libgatewayperlstub.so

3. Restart XFB Gateway for the new parameters to take effect.



Notes:
- You may need to recompile the user exits in order to use the libgatewayperlstub library.

- To use perl modules that are not located in the standard Perl path, export the PERL5LI environment variable.