*=====================================================================*
* GETMAIN_SHARED - Obtain Shared storage *
* *
* Registers: *
* R0 = Used by EXEC CICS call *
* R1 = Used by EXEC CICS call *
* Work Register *
* R6 = Link Register - Return Address *
* R11= EIB register (set on entry) *
* R12= Work register *
* R14= Used by EXEC CICS call *
* R15= Used by EXEC CICS call *
* *
* Logic: *
* Getmain_Shared: *
* EXEC CICS GETMAIN LENGTH(32) SET(UEPTQTOK) SHARED RESP(resp) *
* If resp ¬= OK then *
* Call Error(Getmain_Failed) *
* Else *
* Address shared storage *
* Set eyecatcher 'XTSEREQ Storage' *
* End If *
* Return *
*=====================================================================*
GETMAIN_SHARED DS 0H
L R12,UEPTQTOK Fetch address of token
L R12,0(R12) Fetch shared storage anchor
LTR R12,R12 Is the storage already present?
BNZR R6 ..Yes Return
EXEC CICS GETMAIN LENGTH(32) SET(R12) SHARED X
INITIMG(X'00') RESP(RESP)
CLC RESP,DFHRESP(NORMAL) GETMAIN worked OK?
BNE ERROR7 ..No Goto Error routine
L R1,UEPTQTOK Fetch address of token
ST R12,0(R1) Save address of storage
USING SHARED_STORAGE,R12
MVC SHARED_EYECATCHER,EYE_CATCHER Set Eyecatcher
DROP R12 Drop R12
BR R6 Return to caller
EJECT ,
*
Figure 113. Example exit program for the XTSEREQ exit (Part 12 of 16)
example XTSEREQ global user exit program
818
CICS TS for OS/390: CICS Customization Guide