138 IMS Connectivity in an On Demand Environment: A Practical Guide to IMS Connectivity
Figure 9-4 The function of the HWSYDRU0 user exit
The HWSYDRU0 exit is only an example, and when you use it, the following sequence of
events occurs:
1. The prerouting exit (DFSYPRX0) sets up addressability to the parameters that are passed
to the HWSYDRU0 exit.
2. The output member name in the output parameter list is set to blanks.
3. HWSYDRU0 determines the action to take based on whether the name in the input
destination parameter (that is, the destination where the message is to be sent) is an IMS
LTERM or an IMS Connect destination. After HWSYDRU0 makes this determination, it
takes a course of action and sets the contents of register 15 on exit.
9.5.4 Debugging the IMS OTMA exits
When you need to debug an IMS OTMA exit, HWSYPRX0 or HWSYDRU0, keep in mind that
they can be called in a cross-memory environment. In addition, those exits must be reentrant.
write to operator (WTO) can be used to display debug messages, but you have to be careful:
You must use the LIST-EXECUTE form of WTO, that is, WTO MF=(E,WTOMSG), or you
will find 0C4 abends in the IMS control region.
You must use LINKAGE=BRANCH if you are running in a cross-memory environment.
Example 9-3 shows how WTOs can be safely issued from an IMS OTMA exit routine.
Example 9-3 Issuing WTOs from an IMS OTMA exit routine
LA R7,WTOMSG
BAL R10,DOWTO
DOWTO DS 0H
L R5,ADDRWORK ADDRESS OF 512-BYTE WORK AREA
LTR R5,R5 IS THERE A WORK AREA?
BZR R10 NO - JUST RETURN
USING WTOD,R5 TELL ASSEMBLER
MVC WTOMSGE,WTOMSGL MOVE MESSAGE MASK
MVC WTOTEXT,0(R7) MOVE MESSAGE TEXT
DFSYPRX0
routes to
OTMA client
ALTPCB ISRT TO CLIENT01
ALTPCB ISRT TO CLIENT02
:
ALTPCB ISRT TO CLIENT09
IMS Application
ALTPCB ISRT TO TPIPE001
ALTPCB ISRT TO TPIPE002
:
ALTPCB ISRT TO TPIPE100
ALTPCB ISRT TO TPIPE900
ALTPCB ISRT TO TPIPE901
:
ALTPCB ISRT TO TPIPE999
HWSYDRU0
specifies
final destination
(Tpipe name)
IMS OTMA
TPIPE NAME : CLIENT01
TPIPE NAME : CLIENT02
TPIPE NAME : CLIENT09
TPIPE NAME : MEMBER0
TPIPE NAME : MEMBER9
Chapter 9. IMS Connect user exit support 139
EPAR R0 PRIMARY ASID
ESAR R1 SECONDARY ASID
CLR R0,R1 PRIMARY = SECONDARY?
BNE DOWTOX NO - IN XM MODE
WTO MF=(E,WTOMSGE) WTO TRACE MESSAGE
BR R10 RETURN TO CALLER
DOWTOX DS 0H
WTO MF=(E,WTOMSGE),LINKAGE=BRANCH
BR R10 RETURN TO CALLER
DROP R5 TELL ASSEMBLER
EJECT
WTOMSGL WTO ‘ ', X
ROUTCDE=(11),DESC=(7),MF=L
WTOD DSECT
WTOMSGE DS 0CL58 REENTRANT WTO MESSAGE
DS CL2 TEXT LENGTH
DS CL2 MCSFLAGS
WTOTEXT DS CL50
DS CL4 ROUTING AND DESCRIPTOR CODES
140 IMS Connectivity in an On Demand Environment: A Practical Guide to IMS Connectivity

Get IMS Connectivity in an On Demand Environment: A Practical Guide to IMS Connectivity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.