Sample Data Exits

The following DATAEXIT samples are provided in $CD.SDGASAMP library.

Exits Description
DGAXDXX1 This sample Data exit examines or changes records from a COPY Process based on input data. You can use it to insert, replace, or delete records.
DGAXDXX2 This sample Data exit converts data from EBCDIC to ASCII if sending a file, or from ASCII to EBCDIC if receiving a file.

If you plan to use a Data exit, consider the following items:

  • All Data exits must be re-entrant, follow IBM® Assembler linkage standards, and reside in an authorized load library on the node where they are referenced. These exits must not alter any IBM Connect:Direct® control block fields (except in the EXTCB as indicated in Data Exit Access to Control Blocks). If other IBM Connect:Direct control block fields are altered, the results are unpredictable.
  • Add any message IDs specified by a Data exit to the IBM Connect:Direct Message file. See Custom Messages in the Message Library for instructions.
  • Return from the Data exit in the AMODE under which it was called. For example, if the Data exit is called in 31-bit mode, the return must be in that mode. Return from a Data exit through a Branch Set Mode (BSM) instruction rather than a Branch (BR) instruction.

After you write the Data exit to satisfy your specific data set requirements, implement it by specifying the exit name on the DATAEXIT keyword on a COPY statement.