Exit XDTAD

Exit XDTAD is invoked when a write request is issued to a data table.

For a user-maintained data table and coupling facility data table, the user exit is invoked once - before the record is added to the data table. For a CICS-maintained data table, the user exit is invoked twice - before the record is added to the source data set and then again before the record is added to the data table.

The record written by the application is passed as a parameter to the user exit program - see fields UEPDTRA and UEPDTRL. Your exit 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.

The XDTAD exit must not modify the data in the record. If you used XDTRD to truncate the data records when the 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.

A sample XDTAD exit program is listed in Shared data tables overview.
When invoked
One or more times during the processing of a write request to a data table.
Exit-specific parameters
UEPDTPL
Address of the data table user exit parameter list, which is mapped by DSECT DT_UE_PLIST in copybook DFHXDTDS. The data table user exit parameter list contains:
UEPDTNAM
The 8-character data table name.
UEPDTFLG
A 1-byte flag field. The possible bit settings are:
UEPDTSDT (X'80')
The exit has been invoked by CICS® shared data table support.
UEPDTCMT (X'40')
This is a CICS-maintained table. Only meaningful if UEPDTSDT is on.
UEPDTCFT(X'10')
The exit has been invoked by coupling facility data table support.
UEPDTUMT (X'08')
This is a user-maintained table. Only meaningful if UEPDTSDT is on.
UEPDTRA
The address of the data record.
UEPDTRBL
The fullword length of the data table buffer.
UEPDTRL
The fullword length of the data record.
UEPDTKA
The address of the data table key.
UEPDTKL
The fullword length of the data table key.
UEPDTDSL
The fullword length of the name of the source data set. Only meaningful if either UEPDTSDT or UEPDTCFT is on.
UEPDTDSN
A 44-character field containing the name of the source data set. Only meaningful if either UEPDTSDT or UEPDTCFT is on.
Return codes
UERCDTAC
Add the record to the data table.
UERCDTRJ
Reject the record: that is, do not add it to the table.
XPI calls
All can be used.