Adding a file exit or user exit option

File and user exits receive event data in the same data block structure. Setting up logging for these receivers is similar.

Procedure

  1. Add an option for the exit to the server options file:
    • For a file exit: Add either the FILEEXIT option (for a binary file exit) or FILETEXTEXIT (for a text file exit) option.
      1. Specify whether event logging to the file exit receiver begins automatically at server startup. The parameters are YES and NO. If you do not specify YES, you must begin event logging manually by issuing the BEGIN EVENTLOGGING command.
      2. Specify the file where each logged event is to be stored.
      3. Specify how files will be stored if the file being stored already exists. REPLACE will overwrite the existing file, APPEND will append data to the existing file, and PRESERVE will not overwrite the existing file.
      For example, AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systems
      fileexit yes /tsm/server/data replace
      
      filetextexit yes /tsm/server/data replace
      Windows operating systems
      fileexit yes \tsm\server\data replace
      
      filetextexit yes \tsm\server\data replace
    • For a user exit: Add the USEREXIT option. AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systems
      • Specify whether event logging to the user exit receiver begins automatically at server startup. The parameters for this option are YES and NO. If you do not specify YES, you must begin event logging manually by issuing the BEGIN EVENTLOGGING command.
      • Specify the name of the user-exit function in the service program.
      • Specify a module name of the user exit. This is the name of a shared library containing the exit.
      AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsFor example,
      userexit no fevent.exit
      Windows operating systems
      • Specify whether event logging to the user exit receiver begins automatically at server startup. The parameters for this option are YES and NO. If you do not specify YES, you must begin event logging manually by issuing the BEGIN EVENTLOGGING command.
      • Specify a DLL name that contains the user-exit function.
      • Specify the name of the user-exit function in the DLL.
      • Specify the name of the user-exit function in the service program.
      Windows operating systemsFor example,
      userexit yes dllname.dll dllmodulename
  2. Enable events for the receiver. You must specify the name of the user exit in the USEREXIT server option and the name of the file in the FILEEXIT server option. Here are two examples:
    enable events file error
    enable events userexit error,severe 

    You can also enable events to one or more client nodes or servers by specify the NODENAME OR SERVERNAME parameter. See Enabling and disabling events for more information.

  3. If you did not specify YES in the server option, begin event logging. For example, to begin event logging for a user-defined exit, enter:
    begin eventlogging userexit
    See Beginning and ending event logging for more information.