Using ADALNK User Exits

Entire Net-Work Client allows you to call user exits before and after ACB and ACBX direct calls, if the Adabas interface supports user exits.

Note:
Before you attempt to use these ADALNK user exits, verify that the Adabas TP monitor interface supports user exits. If it does not, you cannot use the ACB and ACBX user exits provided with Entire Net-Work Client. If it does support user exits, you can use the exits described in this section. For more information, refer to the documentation for your Adabas TP monitor interface.

The user exits are not called for Adabas calls that are created by an Adabas utility or if the Adabas command is an internal SPT command (when the command ID starts with "SP" in the first two bytes and has "0xff" in the third byte). Note that the ADATST utility is handled as if it were a normal, non-utility Adabas user.

The before user exits (LNKUEX_0 and LNKUEX_ACBX_0) handling triggers an undocumented Natural feature; if the user exit is called and returns a non-zero response code, but the Adabas command is an RC command, the RC command is suppressed and a successful return is indicated to the calling program.

Samples of these user exits are provided with your Entire Net-Work Client installation.

This document describes how to set up the user exits. It covers the following topics:


Specifying the User Exit File and Function Names

This section describes how to specify the user exit file and function names using the System Management Hub.

Note:
You can also specify them as environment variables instead.

Start of instruction setTo specify the user exit file and function names using the System Management Hub:

Make sure you have accessed the System Management Hub.

  1. Select and expand Entire Net-Work Client from the list in tree-view to access the Entire Net-Work Client administration area.

  2. Select and expand Clients from the Entire Net-Work Client sublist.

    A list of machine names appears. The machines listed are computers on which clients managed by this installation of the System Management Hub are defined.

  3. Select and expand the client machine on which the client is defined.

    The client configuration section becomes available in tree-view.

  4. Right-click on the client configuration whose parameters you want to maintain and select Set LNK User Exit Parameters from the resulting drop-down list.

    The Set LNK User Exit Parameters panel appears in detail-view.

    graphics/wcllnkue.png

  5. Modify the parameters on the LNK User Exit Parameters panel, as described in the following table. When all parameters are set as you want, click OK to save them.

    Note:
    Values should be specified for these parameters using the following format: file_name;function_name

    Parameter Description Required? Default
    LNKUEX_0 Specify the file and function names of the user exit that should be called before an Adabas ACB command is sent to the database. The file name is the name of a library located in the Entire Net-Work Client code directory; ADALNKX loads the library from the location you specify.

    LNKUEX_0 handling triggers an undocumented Natural feature; if the user exit is called and returns a non-zero response code, but the Adabas command is an RC command, the RC command is suppressed and a successful return is indicated to the calling program.

    No No user exit file and function names are called before an Adabas ACB command is sent to the database.
    LNKUEX_1 Specify the file and function names of the user exit that should be called after an Adabas ACB command is sent to the database. The file name is the name of a library located in the Entire Net-Work Client code directory; ADALNKX loads the library from the location you specify. No No user exit file and function names are called after an Adabas ACB command is sent to the database.
    LNKUEX_ACBX_0 Specify the file and function names of the user exit that should be called before an Adabas ACBX command is sent to the database. The file name is the name of a library located in the Entire Net-Work Client code directory; ADALNKX loads the library from the location you specify.

    LNKUEX_ACBX_0 handling triggers an undocumented Natural feature; if the user exit is called and returns a non-zero response code, but the Adabas command is an RC command, the RC command is suppressed and a successful return is indicated to the calling program.

    No No user exit file and function names are called before an Adabas ACBX command is sent to the database.
    LNKUEX_ACBX_1 Specify the file and function names of the user exit that should be called after an Adabas ACBX command is sent to the database. The file name is the name of a library located in the Entire Net-Work Client code directory; ADALNKX loads the library from the location you specify. No No user exit file and function names are called after an Adabas ACBX command is sent to the database.

    The parameters are updated in the appropriate Entire Net-Work Client configuration file.

Modifying the User Exit Code

Samples are provided of all of the Entire Net-Work Client ADALNK user exits.

Start of instruction setTo modify and use the sample ADALNK user exits:

  1. Locate and edit the user exit file supplied in the Adabas Client directories included with your Entire Net-Work Client installation. The sample user exit and the files required to compile and link the source code are usually provided in the Adabas Client installation directory \ProgramData\Software AG\Adabas Client Package\vx.x.xx\examples\client.

    Sample User Exit File Name Contains
    lnkuex.c The sample user exit and files required to compile and link the ADALNK ACB before and after user exits.
    lnkuexacbx.c The sample user exit and files required to compile and link the ADALNK ACBX before and after user exits.
  2. Modify the user exit as required and then compile and link it using the files in the same Adabas Client directory.