Data Exit

Note: User specified program names are limited. For more information, refer to User Specified Program Limitation Feature.

The Data exit functions similarly to the I/O exit; however, the Data exit does not require the I/O management that the I/O exit requires. The Data exit provides an interface to user-written programs, allowing them to add, delete, change, or insert records.

The Data exit is called through the DATAEXIT parameter in the COPY statement or a keyword parameter supplied within the SYSOPTS string.

Note: Checkpoint/restart is supported for Data exits.

DATAEXIT Format

The DATAEXIT format in the COPY statement follows.

Statement Parameters
COPY FROM (DATAEXIT= exitname|(exitname[,parameter,...]))
  TO (DATAEXIT= exitname|(exitname[,parameter,...]))

The DATAEXIT subparameters are:

Parameter Description
exitname The name of the user-written program that receives control for data requests.
parameter A parameter or list of parameters passed to the exit. See the RUN TASK statement.

The following example shows the DATAEXIT parameter in the COPY statement.

COPY01   COPY    FROM    (PNODE DSN=GJONES1.FROM.DSN                      -
                           DATAEXIT=(CD$DGAXDXX01,CL6'WEEKLY')                -
                            )                                             -
                 TO     (SNODE DSN=GJONES1.TO.DSN                         -
                           DCB=(DSORG=PS,LRECL=80,BLKSIZE=32000)          -
                           DISP=(NEW,DELETE,DELETE)                       -
                           SPACE=(CYL,(1,0,0))                            -
                           DATAEXIT=(CDDATAEX,CL44'GJONES1.TO.DSN')         -
                           UNIT=SYSDA)

The following example shows DATAEXIT used as a SYSOPTS parameter.

COPY01   COPY    FROM    (PNODE DSN=GJONES1.FROM.DSN                    -
                            SYSOPTS="DATAEXIT=(CD$DXX01,CL6'WEEKLY')"   -
                            )                                           -
                 TO      (SNODE DSN=GJONES1.TO.DSN                      -
                           DCB=(DSORG=PS,LRECL=80,BLKSIZE=32000)        -
                           DISP=(NEW,DELETE,DELETE)                     -
                           SPACE=(CYL,(1,0,0))                          -
                           DATAEXIT=(CDDATAEX,CL44'GJONES1.TO.DSN')       -
                           UNIT=SYSDA)