Using user exit data events

Start of changeTo use user exit data events, you must update the DBDEF macro to indicate which z/TPFDF files that you want to monitor and collect. Use the ZBEVF ENABLE command to enable data event processing and use the tpf_dev_control function to manage the behavior of the data event collection for an ECB.End of change

Before you begin

  • Identify which z/TPFDF files that you want to monitor and collect with data event processing.
  • For each file, make the following decisions:
    • Determine the logical records (LRECs) that you want to collect based on the LREC ID (primary key).
    • Determine the uniqueness of the LRECs to be collected by data event processing.
    • Determine which dispatch user exit you want to use:
      • The data event z/TPFDF close user exit (UDE1) dispatches the user exit data event when the subfile closes.
      • The data event ECB exit user exit (UDE2) dispatches the user exit data event when the ECB exits.
    • Determine whether you want to use a user exit data event enrichment program.

For more information, see Plan for user exit data events.

Procedure

  1. Update the DBDEF macro statements for each of the z/TPFDF files that you want to collect with the appropriate DBDEF data event parameters, as follows:
    1. Enable user exit data events for this file by coding the DEVCLCT parameter.
    2. Specify the dispatch method that you want to use by coding the DEVDSPCH parameter.
    3. Specify the LRECs that you want to collect and the uniqueness of those LRECs by coding the DEVPKY parameter.
    4. Optional: Specify the name of the user exit data event enrichment program by coding the DEVENRCH parameter.
  2. Optional: If you specified the DEVENRCH parameter on one or more DBDEF statements, code the associated user exit data event enrichment programs to add context to or modify the data event records.
  3. Code the dispatch user exit (UDE1, UDE2, or both) that you want to use based on the dispatch method specified on the DBDEF statements.
  4. Build and load the DBDEF statements, user exits, and user exit data event enrichment programs.
  5. Rebuild the DBDEF index table and activate the newly loaded DBDEF programs by entering the ZUDFM DEF command with the INIT parameter specified on z/TPF system.
  6. Optional: Display the database information for each DBDEF that was loaded in 4 by entering the ZUDFM DEF command with the DBS parameters specified. Validate that the data event parameters were loaded as expected.
  7. Start of changeEnable data event processing by entering the ZBEVF ENABLE command with the DATA parameter or the ALL parameter specified. To display the processors that have data event processing enabled, enter ZBEVF DISPLAY SETTINGS.End of change

What to do next

Use the tpf_dev_control function in your applications as needed to change the data collection behavior for an ECB.