Data Exit Requests

The Data exit is called with IBM® Connect:Direct® requests that are found in EXTOPER, which is a field in EXTCB. Input and output Data exits receive the following requests:

Note: Upon return from the Data exit, any nonzero value in EXTRTNCD causes the Process to terminate with RC=8 and an SCPA049I message.
BEGIN Request

IBM Connect:Direct makes a BEGIN request to a Data exit when it begins communication with the exit. The exit is passed to a 4K work area that remains constant throughout this step in the Process. If additional storage is required, it can be obtained and anchored in the 4K work area.

OPEN Request

IBM Connect:Direct makes an OPEN request to a Data exit after the file is open and before the first data record is read.

GET Request

IBM Connect:Direct makes a GET request to a Data exit before adding the record to the buffer for transmission to the remote. At this point, the Data exit instructs IBM Connect:Direct to pass the record unchanged, change the record, delete the record, or insert records by setting the appropriate flag bit in EXTEAI in the EXTCB.

Flag bit setting Action
All bits off Pass the record unchanged
EXTEAIRR Replace the record. Update EXTINARA to point to the new record and EXTINLNG with the new record length.
EXTEAIRD Delete the record.
EXTEAIRI Insert a new record. (The next call present the original record again and you can continue to insert records.) If pointing to a new record, set EXTEAIRR. Update EXTINARA to point to the new record and EXTINLNG with the new record length.

If records are inserted in place of an original record, the original record delete the original record after the inserted records are passed.

PUT Request

IBM Connect:Direct makes a PUT request to the Data exit before sending the record to the z/OS I/O system (IOS). At this point, the Data exit instructs IBM Connect:Direct to pass the record unchanged, change the record, delete the record, or insert records by setting the appropriate flag bit in EXTEAI in the EXTCB.

Flag bit setting Action
All bits off Pass the record unchanged.
EXTEAIRR Replace the record. Update EXTOTARA to point to the new record and EXTOTLNG with the new record length.
EXTEAIRD Delete the record.
EXTEAIRI Insert a new record. (The next call presents the original record again and you can continue to insert records.) If pointing to a new record, set EXTEAIRR. Update EXTOTARA to point to the new record and EXTOTLNG with the new record length.

If records are inserted in place of an original record, delete the original record after the inserted records are passed.

CLOSE Request

IBM Connect:Direct makes a CLOSE request to a Data exit when the file is to close.

END Request

IBM Connect:Direct makes the END request to a Data exit to end communication with the exit. The exit releases any work areas allocated when it received the BEGIN request. This request is the last request a Data exit receives.