The Link3270 bridge facility that is allocated in the initial region at the start of the pseudo-conversation is referred to as the primary Link3270 bridge facility. It is important that the application temporary storage queues are not deleted until the completion of the pseudo-conversation, at which time the primary Link3270 bridge facility is deleted. The XFAINTU global user exit runs when the Link3270 bridge facility expires, so you can add functionality to this user exit to ensure that the temporary storage queues are not deleted until the pseudo-conversation is complete.
When the primary Link3270 bridge facility is allocated, CICS® SFR writes a temporary storage queue record containing the primary bridge facility token. The terminal id is used as a portion of the queue name. Use the provided sample Figure 1 to check if the expired bridge facility is the primary facility. You need to write a program that deletes the temporary storage queues, that is invoked by XFAINTU if it matches the primary facility token with the expired Link3270 bridge facility.
DFHUEXIT TYPE=EP,ID=XFAINTU Standard UE parameters for XFAINTU 45300000
***********************************************************************
* REGISTER USAGE : *
* R0 - *
* R1 - address of DFHUEPAR on input, and used by XPI calls *
* R2 - address of standard user exit parameter list, DFHUEPAR *
* R3 - BASE address *
* R4 - address of XFAINTU request byte *
* R5 - address of XFAINTU TIDY-UP TYPE *
* R6 - work register *
* R7 - ADDRESS OF TS QUEUE SUFFIX TABLE *
* R8 - ADDRESS OF TCTUA *
* R9 - ADDRESS OF BRIDGE FACILITY NAME *
* R10- *
* R11- ADDRESS OF EIB *
* R12- *
* R13- address of kernel stack prior to XPI CALLS *
* R14- used by XPI calls *
* R15- return code, and used by XPI calls *
* (The register equates are declared by the DFHUEXIT call above) *
***********************************************************************
R0 EQU 0
R1 EQU 1
R2 EQU 2
R3 EQU 3
R4 EQU 4
R5 EQU 5
R6 EQU 6
R7 EQU 7
R8 EQU 8
R9 EQU 9
R10 EQU 10
R11 EQU 11
R12 EQU 12
R13 EQU 13
R14 EQU 14
R15 EQU 15
SPACE 2
XFAINTU DFHEIENT DATAREG=13,CODEREG=3,EIBREG=11
XFAINTU AMODE 31
XFAINTU RMODE ANY
LR R2,R1 Address standard parameters
USING DFHUEPAR,R2
L R9,UEPFANAM ADDRESS OF BRIDGE FACILITY NAME
MVC BFTRMID(4),0(R9) GET TERMID
L R4,UEPFAREQ Address of why exit called: Init or Tidy-up
L R5,UEPFATUT Address of XFAINTU Tidy-up type
L R8,UEPFAUAA TCTUA address
L R6,UEPFATK LOAD Facility Token address
MVC BFAC(8),0(R6) get bridge facility token
***********************************************************************
* WHY WAS EXIT CALLED, INITIALIZATION OR TIDY-UP? *
***********************************************************************
CLI 0(R4),UEPFATU
BE TIDYUP
***********************************************************************
* INSERT INITIALIZATION for TCTUA HERE *
***********************************************************************
B END
TIDYUP DS 0H
***********************************************************************
* CHECK IF PRIMARY FACILITY *
***********************************************************************
EXEC CICS READQ TS QNAME(QNAME), +
INTO(PBFAC), +
ITEM(1), +
LENGTH(PBFACLEN), +
RESP(RESPCD).
CLC RESPCD,DFHRESP(NORMAL)
BNE END
CLC BFAC(8),PBFAC
BNE END
***********************************************************************
* Primary facility is being deleted, so delete TS queues *
***********************************************************************
* DELETE APPLICATION TS QUEUES WITH APPLICATION PROGRAM
EXEC CICS LINK PROGRAM(deletets),
COMMAREA(BFTRMID),
LENGTH(4),
RESP(RESPCD).
END DS 0H
GLUEND DS 0H Standard GLUE ending code
LA R15,UERCNORM CONTINUE PROCESSING
DFHEIRET RCREG=15 Return to CICS
***********************************************************************
* Constants *
***********************************************************************
QNAME DS 0H
QNAMEPRE DC CL5'DFHMA'
BFTRMID DS CL4
SUFFIX DS XL7'FFFFFFFFFFFFFF'
PBFACLEN DC H'8'
PBFAC DS CL8
BFAC DS CL8
RESPCD DS F
DFHEISTG
END XFAINTU