DFHTEP 递归重试例程
*ASM XOPTS(NOPROLOG NOEPILOG SP)
************************************************************************
* *
* DFHTEP RECURSIVE RETRY ROUTINE *
* *
************************************************************************
DFHEISTG
DFHEIEND
DFHTEPCA TYPE=DSECT COMMAREA passed by TACP
COPY DFHA06DS Statistics DSECT
USING DFHA06DS,STATBAR
PCIAREA DSECT
PCISAVE DS XL6 User Field A
PCICNT DS PL2 User Field B
*
TCTLEAR EQU 2 Pointer to TACLE
STATBAR EQU 4 Pointer to statistics DSECT
TCTUABAR EQU 5 Pointer to TCTUA
COMMABAR EQU 12 Pointer to COMMAREA passed by TACP
EJECT
DFHTEP CSECT
***********************************************************************
* Establish addressability *
***********************************************************************
DFHEIENT
*
EXEC CICS ADDRESS EIB(11)
*
EXEC CICS ADDRESS COMMAREA(COMMABAR)
*
USING DFHTEPCA,COMMABAR
L TCTLEAR,TEPCATCA Load TACLE address
*
USING PCIAREA,TCTUABAR
L TCTUABAR,TEPCECIA Load TCTUA address
*
***********************************************************************
* Start processing *
***********************************************************************
TM PCICNT+1,X'0C' Has User Field B been initialized
* to a packed decimal number?
BO CKCOUNT YES .... so compare the system count
* with the existing count in Field B
RESET DS 0H
MVC PCICNT,=PL2'+0' NO .... so initialize field B to
* packed zero.
*
EXEC CICS COLLECT STATISTICS TERMINAL(TEPCATID) SET(STATBAR)
* Get statistics for this terminal
* using TERMID passed in Commarea
*
MVC PCISAVE,A06TENI Save the current system counts. This
* is a new error, or first time
* through.
INCR DS 0H
AP PCICNT,=P'1' Increment the number of times this
* error has occurred (recursive count)
*
CP PCICNT,=P'10' Has the maximum recursive error
* limit been reached?
BNE RETRY NO .... set action
*
ZAP PCICNT,=P'0' Clear and reset user fields for next
* error set
EXEC CICS COLLECT STATISTICS TERMINAL(TEPCATID) SET(STATBAR)
* Get statistics for this terminal
* using TERMID passed in COMMAREA
*
MVC PCISAVE,A06TENI Get current system counts
B NORETRY Action indicators for no retry
*
CKCOUNT DS 0H
EXEC CICS COLLECT STATISTICS TERMINAL(TEPCATID) SET(STATBAR)
* Get statistics for this terminal
* using TERMID passed in COMMAREA
*
CLC PCISAVE,A06TENI Has system count changed since last
* entry to TEP?
BNE RESET YES .... this is a new error since
* some I/O activity has occurred on
* terminal.
B INCR NO .... this is a recursive error,
* so increment the recursive count and
* check for retry.
RETRY DS 0H
* The user would include here the code
* necessary to alter the flags in the
* COMMAREA so that a retry can be
* performed on the terminal.
NORETRY DS 0H
* The user would include here the code
* necessary to allow DFHTACP to take
* final actions on the terminal; that
* is, abend task, put line out of
* service, and others.
LTORG ,
END
请注意, 图 1 中的代码仅用于说明递归错误处理技术以及建立对适用控制块的可寻址性所需的步骤。