Adapter tracking sample task-related user exit program (DFH$APDT)

DFH$APDT is a sample task-related user exit (TRUE) program, which contains adapter data fields that you can use for transaction tracking.

The sample exit program DFH$APDT is supplied in both source and object code. The source is supplied in the hlq.SDFHSAMP sample library, and the executable form in the hlq.SDFHLOAD load library. You must tailor this sample program before you use it in a production environment.

The DFH$APDT sample TRUE program can be used in one of two ways:
  • It can be enabled for TASKSTART, for example by using the command EXEC CICS ENABLE PROGRAM(DFH$APDT) TASKSTART START so that it is called at the start and end of every task. The exit sets interest in context management for every task, and is called each time a START command is issued by any subsequent task.
  • It can be enabled and started by using the EXEC CICS ENABLE PROGRAM(DFH$APDT) START command. The exit can then be started by an application program by using a DFHRMCAL request. The exit sets interest in context management, and is called for each subsequent START command issued by the application program.

When you set interest in context management for a transaction, all subsequent START requests that are issued by the transaction cause the exit to be called and the adapter data fields to be set. In the DFH$APDT sample, these fields are set from constants, but for a real adapter their content is based on context. CICS® uses the contents of these fields to populate the adapter data fields in the origin data section of the association data of the task that is being started. This association data is then available for transaction tracking.