终端未知样本出口程序:DFHXTENF
DFHXTENF 是样本全局用户出口程序,可处理从 START 和 ATI 请求出现的终端未知情况。 它旨在于 XALTENF 或 XICTENF 出口处调用。
关于 DFHXTENF
DFHXTENF 是可用于 XALTENF 和 XICTENF 出口的样本程序。 基于 DFHXTENF ,您可以创建自己的全局用户出口程序,该程序可用于两个出口,或者为每个出口创建单独的程序。
图 1 显示了提供的样本程序 DFHXTENF 中的可执行代码。 DFHXTENF 拒绝瞬时数据请求,因为这种情况下的操作非常依赖于安装。
DFHXTENF CSECT
DFHVM XTENF
ENTRY DFHXTENA
DFHXTENA DS 0H
STM R14,R12,12(R13) save registers
BALR R11,0 set up base register
USING *,R11
*
USING DFHUEPAR,R1 DFHUEH parameter list
*
* Could check the terminal ID at this point. In this
* program we assume it is valid. We also choose to accept
* START requests and reject Transient Data trigger level
* events.
*
L R2,UEPICEVT access type of request
CLC 0(2,R2),START START command?
BE STARTCMD yes
*
CLC 0(2,R2),STARTDAT START command with data?
BNE NOTSTART no, must be Transient Data
*
STARTCMD DS 0H
*
* Accept the default netname if we are Function Shipping.
* Otherwise build a netname.
*
L R2,UEPICFS access FS information
CLI 0(R2),UEPICFY Function Shipping?
BNE BLDNETNM no, build a netname
*
LH R15,NETNAME accept the default netname
B EXIT
*BLDNETNM DS 0H
*
* Build a netname by taking the first character of the
* terminal ID and appending it to the characters 'CICS'.
*
L R2,UEPICNTO access the output netname field
L R3,UEPICRTR access ID of requested terminal
MVC 0(8,R2),=C'CICS '
MVC 4(1,R2),0(R3) first character of terminal ID
LH R15,NETNAME netname returned
B EXIT
*
NOTSTART DS 0H
LH R15,UNKNOWN reject Transient Data trigger *
level events
*
EXIT DS 0H
L R14,12(R13) restore registers except 15
LM R0,R12,20(R13) which contains the return code
BR R14
*
***********************************************************************
* Local constants
***********************************************************************
START DC AL2(UEPICES)
STARTDAT DC AL2(UEPICESD)
NETNAME DC AL2(UERCNETN)
UNKNOWN DC AL2(UERCTEUN)
*
DFHEND DFHXTENF
重要信息: 图 1 中的示例纯粹是为了演示一些可用的可能性,在生产环境中是不切实际的。