CICS与数据表退出程序之间的通信

参数列表用于在 CICS® 与数据表出口程序之间传递信息。

在 SDFHMAC 库中, CICS 提供名为 DFHXDTDS 的副本,其中包含用于定义此参数列表的 DSECT。 在每个出口程序中包含 COPY DFHXDTDS 语句。 DSECT 显示在 图 1中。

凡是看到 nn 的地方, nn 表示 CICS 版本, library 就是库名称。 例如, CICSTS64。 CICS.SDFHLOAD。

此 DSECT 中使用的字段名称在图后的用户出口描述中引用。

图 1。 数据表用户出口参数列表
***********************************************************************
*                                                                     *
*   Data Table Parameter List for User Exits XDTRD, XDTAD and XDTLC.  *
*                                                                     *
*   Some of the parameters are only used by one or two of the exits.  *
*   This is indicated in the comments for those parameters.           *
*   The comments also indicate whether the field is used for input    *
*   (In), output (Out), or both (In/Out).                             *
*                                                                     *
*   This definition can be used by exit programs running on CICS      *
*   regions which are at a level to support coupling facility data    *
*   tables (CFDT), providing the UEPDTCFT flag is used to test        *
*   whether the exit has been invoked from within coupling facility   *
*   data tables support, and that parameters which are specific to    *
*   CFDT support are only used when it is set.  CFDT support will     *
*   only be available to exit programs running on CICS regions at     *
*   the CICS Transaction Server version 1 release 3 level or higher.  *
*                                                                     *
*   This definition can be used by exit programs running on CICS      *
*   regions which are at a level to support shared data tables (SDT), *
*   or which have SDT support installed, providing the UEPDTSDT flag  *
*   is used to test whether the exit has been invoked from within     *
*   shared data tables support, and that the parameters which are     *
*   specific to SDT support are only used when it is set.  SDT        *
*   support will only be available to CICS regions running at the     *
*   CICS/ESA version 4 release 1 level or higher (or running on       *
*   CICS/ESA version 3 release 3 if the Shared Data Tables feature    *
*   is installed).                                                    *
*                                                                     *
*   Careful use of these flags, and of the parameters which relate    *
*   to the various kinds of data tables support, should allow the     *
*   same user exit program to be used for more than one kind of data  *
*   table.                                                            *
*                                                                     *
***********************************************************************
DT_UE_PLIST_DSECT  DSECT ,
DT_UE_PLIST        DS  0XL84            Data Table User Exits          X
                                        Parameter List
UEPDTNAM             DS  CL8            Data table name (In)
UEPDTFLG             DS  0CL1           Flags (In):
图 2。 数据表用户出口参数列表继续

*---------------------------------------------------------------------*
*            The UEPDTSDT and UEPDTCFT flags indicate whether the     *
*            exit has been invoked for shared data tables or for      *
*            coupling facility data tables support.                   *
*                                                                     *
*            The UEPDTCMT and UEPDTUMT flags are available only to    *
*            exits which have been invoked by shared data tables      *
*            support.  They distinguish the two kinds of shared       *
*            data table.                                              *
*                                                                     *
*            If the exit has been invoked by CFDT support, then the   *
*            data table can only be a coupling facility data table,   *
*            so there are no extra flags to identify the kind of      *
*            data table when the exit has been invoked by coupling    *
*            facility data tables support.                            *
*                                                                     *
*            The UEPDTOPT flag is available to exits which have       *
*            been invoked by either shared data tables support or     *
*            coupling facility data tables support.                   *
*---------------------------------------------------------------------*
                       DS  BL1
UEPDTSDT               EQU X'80'        Exit invoked by SDT support
UEPDTCMT               EQU X'40'        Table is CICS-maintained
UEPDTOPT               EQU X'20'        Exit invoked by table loader,  X
                                        so optimization of the load by X
                                        skipping may be requested      X
                                        (flag is for XDTRD only)
UEPDTCFT               EQU X'10'        Exit invoked by CFDT support   X
 
UEPDTUMT               EQU X'08'        Table is user-maintained
*                      EQU X'07'        Reserved
图 3。 数据表用户出口参数列表继续

*---------------------------------------------------------------------*
*          The following fields are available to exits which          *
*          have been invoked by all flavors of data tables support.   *
*          Not all fields are available at all of the exit points.    *
*---------------------------------------------------------------------*
UEPDTORC             DS  AL1            Data table load return code -  X
                                        XDTLC only, values below (In)
                     DS  BL2            Reserved
UEPDTRA              DS  A              Data record address - XDTRD    X
                                        and XDTAD only (In)
UEPDTRBL             DS  F              Data buffer length - XDTRD and X
                                        XDTAD only (In)
UEPDTRL              DS  F              Data table record length -     X
                                        XDTRD and XDTAD only, XDTRD    X
                                        can return new length in here  X
                                        if it amends record (only      X
                                        allowed for UMT or CFDT)       X
                                        (In/Out)
UEPDTKA              DS  A              Key address - XDTRD and XDTAD  X
                                        only (In)
UEPDTKL              DS  F              Key length - XDTRD and XDTAD   X
                                        only (In)
图 4: 数据表用户出口参数列表继续

*---------------------------------------------------------------------*
*          The following fields are available to exits which          *
*          have been invoked either by shared data tables support     *
*          or by coupling facility data tables support.               *
*          Not all fields are available at all of the exit points.    *
*---------------------------------------------------------------------*
UEPDTDSL             DS  F              Length of data set name (In)
UEPDTDSN             DS  CL44           Source data set name (In)
UEPDTSKA             DS  A              Address of skip-key area: exit X
                                        should return a key of length  X
                                        UEPDTKL in this area if it has X
                                        requested optimisation of load X
                                        by skipping - XDTRD only (In)
*---------------------------------------------------------------------*
*   Values for UEPDTORC (supplied to XDTLC exit only)                 *
*---------------------------------------------------------------------*
UEPDTLCS           EQU 0                load completed successfully
UEPDTLFL           EQU 128              load failed

用户出口应在寄存器 15 中设置返回码。 返回码值由 DFHUEXIT 宏提供。 以下描述中提供了每个用户出口的有效值。

您可以检查 UEPDTFLG 以了解哪些版本的数据表支持调用出口程序。 对于共享数据表,此标志字节还指示正在使用哪种类型的数据表以及在装入期间是否正在调用出口程序。

出口程序应使用文件名 (字段 UEPDTNAM) 或源数据集的名称 (请参阅字段 UEPDTDSN 和 UEPDTDSL) 来确定是否对此文件执行任何操作。

您可以在同一出口点启用多个出口程序,例如,每个出口程序都对特定文件或数据集执行操作。