The XDTAD user exit is invoked when a write request is issued to a data table.
The record written by the application is passed as a parameter to the user exit program--see fields UEPDTRA and UEPDTRL. This program can choose (depending on the key value, for example--see fields UEPDTKA and UEPDTKL) whether to include the record in the data table or not. This decision is indicated by setting the return code.
Depending on the return code value, the following action is taken by CICS:
Return code | Action |
---|---|
UERCDTAC | Add the record to the data table. This is the default if the exit is not activated. |
UERCDTRJ | Do not add the record to the data table. |
The XDTAD exit must not modify the data in the record. If you used XDTRD to truncate the data records when the user-maintained data table was loaded, you must code your application so that it only tries to write records of the correct format for the data table.