3. IMS Regional User Group
Introduction
IMS OTMA
– IMS/ESA 5.1 introduced the IMS OTMA (Open Transaction
Manager Access) feature
• There have been MANY enhancements since then
– The OTMA code runs in the IMS Control Region
– This feature uses the MVS cross-coupling facility (XCF) to send
and receive data (messages and commands) to/from IMS from
MVS applications (OTMA clients)
• No VTAM or TCP/IP is involved
• OTMA clients do not have to be in the same LPAR as IMS
– They just have to be in the same SYSPLEX.
Understanding IMS OTMA Commit Mode and Synchronization Level 3
4. IMS Regional User Group
Introduction
There is a wide variety of OTMA clients
– MQSeries includes an IMS OTMA client
• “MQSeries-IMS Bridge”
– IMS Connect is an IBM provided OTMA client for TCP/IP
– DB2 Stored Procedures include an OTMA Client
• DSNAIMS
– You can write your own OTMA client
• Using the XCF Interface (VERY hard to do)
• Using the OTMA Callable Interface from Java, C or C++ programs
– Many vendors provide OTMA clients
Understanding IMS OTMA Commit Mode and Synchronization Level 4
5. IMS Regional User Group
SERVER
z/OS,WIN,
AIX, SUN, … z/OS z/OS
IMS Control
Center Any Websphere
TCP/IP ITRA SCI
Websphere App
Websphere
IMS TM
Resource OM
Adapter
ITRA
MFS Web
XCF IMS
Services PC
ICON XCF
TCP/IP ICON
IMS SOAP
Gateway RYO
TCP/IP Client OTMA XCF
TCP/IP
Application IMS BRIDGE
IMS BRIDGE
MQSeries
SNA TN3270 MQSeries
MQSeries
BTAM <V10
VTAM LU1 VTAM
LU2
LU 6.1
LU 6.2
End User
Understanding IMS OTMA Commit Mode and Synchronization Level 5
6. IMS Regional User Group
Introduction
XCF GROUP
ICON1 GRNAME=GR1 IMSA
TMEMBER1 TPIPE's OTMANM=IMSAOTMA
DS1
TMEMBER2
DS2
DS3
TMEMBER3
Names are not defined
XCF GROUP in any IMS GEN
GRNAME=GR2
MQSeries
IMSB
OTMANM=IMSBOTMA
IMS
Bridge
Queue
TPIPE's
Storage TMEMBER4
Class
Understanding IMS OTMA Commit Mode and Synchronization Level 6
7. IMS Regional User Group
TPIPEs (Transaction Pipes)
OTMA equivalent of LTERMs
Input (IOPCB) TPIPE names are specified by the OTMA
Client in the OTMA header
– For IMS Connect for CM1 messages it is the TCP/IP Port which
received the input message
– For IMS Connect for CM0 messages it is the ICON Client Name
• This could lead to MANY TPIPEs!!!
– For MQSeries there are 2 TPIPEs per IMS Bridge Queue
• One for “asynchronous” messages (CM0)
• One for “synchronous” messages (CM1)
• The name is a 3-character user supplied prefix and a 5-digit number
– It is a 2-character prefix if using MQSeries shared queues
– If the TPIPE does not exist is it created
Understanding IMS OTMA Commit Mode and Synchronization Level 7
8. IMS Regional User Group
Client Interface
The OTMA client communicates information to IMS
and gets information from IMS in a prefix passed in
front of the message (or command)
– The prefix has 4 sections mapped by macro DFSYMSG (or
HWSOMPFX for ICON):
• Control: TPIPE name and type, message type, chaining, etc.
• State Data: Commit mode, Sync Level, IOPCB LTERM and
MODNAME override, etc.
• Security: Security scope, Userid, Group, Utoken, no password
• User: Client specific – maximum of 1,024 bytes
Understanding IMS OTMA Commit Mode and Synchronization Level 8
9. IMS Regional User Group
Client Interface
OTMA Synclevel
– Specified by the OTMA client on each input message
– Determines how output messages are acknowledged by the
OTMA client
• IOPCB output and ALTPCB output
– Synclevel 0 (SL0) - None
• The output message is not acknowledged – no ACK/NAK
– Synclevel 1 (SL1) - Confirm
• The OTMA client must send an ACK/NAK for the output message
– Dequeue/Reenqueue the output message (CM0)
– Complete syncpoint – (CM1)
• MQSeries always uses SL1
– Synclevel 2 (SL2) - Syncpoint
• The OTMA client is participating in 2-phase commit
• Only supported by IMS Connect and IMS TM Resource Adapter
Understanding IMS OTMA Commit Mode and Synchronization Level 9
10. IMS Regional User Group
Client Interface
OTMA Synclevel
– Does not apply to OTMA acknowledging input messages
– To ask OTMA to acknowledge an input message set
TMAMCRSI to TMAMCRRQ (x’20’) in the Control section in the
OTMA header
• MQSeries always does this
• IMS Connect does not do this
– With one exception – Send-Only with ACK
Understanding IMS OTMA Commit Mode and Synchronization Level 10
11. IMS Regional User Group
Client Interface
OTMA Commit Mode
– Specified by the OTMA client on each input message
– Determines how IOPCB output messages are sent
– Similar to APPC-IMS Commit Mode
Understanding IMS OTMA Commit Mode and Synchronization Level 11
12. IMS Regional User Group
Client Interface
OTMA Commit Mode
– Commit Mode 1 (CM1) - Send-then-commit
• IMS sends the IOPCB output and may wait for an ACK before
syncpoint is complete
– Synch level 0 (None) – no ACK – continue syncpoint
– Synch level 1 (Confirm) – wait for ACK/NAK
– Synch level 2 (Synchpoint) – wait for ACK/NAK + RRS
• Increases region occupancy
• MQSeries calls these “synchronous” messages
– The output message is “synchronous” with syncpoint completion
Understanding IMS OTMA Commit Mode and Synchronization Level 12
13. IMS Regional User Group
Client Interface
OTMA Commit Mode
– Commit Mode 1 - Send-then-commit
• Output messages are not queued
– Anchored on a control block called a TIB (Transaction Instance Block)
– The destination name is x’FDFFFFFFaaaaaaaa’
• aaaaaaaa is the address of a CLB associated with the TIB
• Not the address of the TIB control block
• If the message can not be sent to the client or is NAKed by the client
(SL1) the transaction abends with U0119 and backs out
• CM1 is required for Conversational and Fast Path EMH messages
Understanding IMS OTMA Commit Mode and Synchronization Level 13
14. IMS Regional User Group
Client Interface
OTMA Commit Mode
– Commit Mode 1 - Send-then-commit
• For Synclevel 0 (SL0) even though the OTMA client gets the
message before the syncpoint is complete it should not process the
message until it receives a “deallocation” message from OTMA
indicating the status of the syncpoint
– “Commit Confirm” or “Commit Abort”
– “De-allocate Confirm” or “De-allocate Abort”
– Only returned at the end of a conversation for IMS Conversations
– If the syncpoint did not complete successfully the OTMA client should
discard the message
• IMS Connect does this and sends an error message to the ICON Client
instead
• MQSeries always uses SL1
• OTMA C/I does this
Understanding IMS OTMA Commit Mode and Synchronization Level 14
16. IMS Regional User Group
OTMA Client Interface – IMS Connect
CM1 SL0 – Syncpoint OK
ICON CLIENT ICON OTMA MPR
SVT TIB
PROCESS
SYNC
11
SYNC OK
12
XCF SEND
XCF SEND 13
DEALLOCATE
CONFIRM
FREE TIB
SEND
REPLY 14 SYNC
TCP/IP WRITE
REPLY 16 COMPLETE
KEEP/FREE
15
PROCESS SVT
REPLY
17
18
Understanding IMS OTMA Commit Mode and Synchronization Level 16
17. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL0 – Syncpoint OK
1. An IMS Connect Client sends a CM1 SL0 input message to ICON
2. IMS Connect allocates a control block for the Client (SVT) if it does
not already exist and sends the input message to IMS OTMA via
XCF
• The TPIPE name is the Port number that received the input message
1. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
– X’01’ log record – input message
• Enqueues the input message on the transaction queue
– X’35’ log record - enqueue
Understanding IMS OTMA Commit Mode and Synchronization Level 17
18. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL0 – Syncpoint OK
4. The IMS transaction does a GU to the IOPCB to retrieve the input
message
• X’31’ log record – “DL/I Get Unique”
4. The IMS transaction ISRTs the reply message to the IOPCB
• X’03’ log record – output message
4. The reply message is anchored on the TIB
• No X’35’ log record – message is not enqueued
7. The IMS application reaches a syncpoint (GU IOPCB, termination)
Understanding IMS OTMA Commit Mode and Synchronization Level 18
19. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL0 – Syncpoint OK
8. IMS OTMA retrieves the reply message from the message queue
• X’31’ log record – “Communications Get Unique”
8. IMS OTMA sends the reply message to IMS Connect via XCF and
deletes it from the IMS Message Queue
• X’33’ log record – Free DRRN
8. IMS Connect anchors the reply message on the SVT waiting for the De-
Allocate
Understanding IMS OTMA Commit Mode and Synchronization Level 19
20. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL0 – Syncpoint OK
11. Syncpoint proceeds
• X’5610’ record – begin Phase 1 syncpoint
• X’37’ – end Phase 1 syncpoint – begin Phase 2 syncpoint
12. Syncpoint completes successfully
13. OTMA sends the De-Allocate Confirm to IMS Connect (not if Conversation)
14. OTMA deletes the TIB control block (not if Conversation) and frees the input
message
• X’33’ log record – free DRRN
Understanding IMS OTMA Commit Mode and Synchronization Level 20
21. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL0 – Syncpoint OK
15. Syncpoint completes
• X’5612’ log record – end Phase 2 syncpoint
15. IMS Connect sends the reply message to the IMS Connect Client
16. If this is a persistent socket IMS Connect keeps the connection open
and does not free the SVT control block
17. The ICON Client processes the reply message
Understanding IMS OTMA Commit Mode and Synchronization Level 21
22. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL0 – Syncpoint OK
– This is what you would have seen in IMSPI if you had done a TX on
the x’01’ log record
01 Input Message TranCode=TRANA Source=CONNECT
35 Input Message Enqueue TranCode=TRANA
08 Application Start TranCode=TRANA Region=0001
5607 Start of UOR Program=PROGRAMA Region=0001
31 DLI GU TranCode=TRANA Region=0001
03 Output Message Response LTerm=6001 Source=CONNECT
31 Message GU for APPC LTerm=6001
33 Free Message
5610 Syncpoint Start of Phase 1 Region=0001
3730 Syncpoint End of Phase 1 Region=0001
33 Free Message
5612 Syncpoint End of Phase 2 Program=PROGRAMA Region=0001
07 Application Terminate TranCode=TRANA Region=0001
Understanding IMS OTMA Commit Mode and Synchronization Level 22
25. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL0 – Syncpoint Fail
1. An IMS Connect Client sends a CM1 SL0 input message to ICON
2. IMS Connect allocates a control block for the Client (SVT) if it does
not already exist and sends the input message to IMS OTMA via
XCF
• The TPIPE name is the Port number that received the input message
1. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
Understanding IMS OTMA Commit Mode and Synchronization Level 25
26. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL0 – Syncpoint Fail
4. The IMS transaction does a GU to the IOPCB to retrieve the input
message
5. The IMS transaction ISRTs the reply message to the IOPCB
6. The reply message is anchored on the TIB
7. The IMS application reaches a syncpoint (GU IOPCB, termination)
8. IMS OTMA retrieves the reply message from the message queue
9. IMS OTMA sends the reply message to IMS Connect via XCF and
deletes it from the IMS Message Queue
10. IMS Connect anchors the reply message on the SVT waiting for the De-
Allocate
Understanding IMS OTMA Commit Mode and Synchronization Level 26
27. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL0 – Syncpoint Fail
11. Syncpoint proceeds
12. Syncpoint fails
13. OTMA process the syncpoint failure
• OTMA sends the DFSxxx message to IMS Connect via XCF
• OTMA sends the De-Allocate Abort to IMS Connect via XCF
• Because this is XCF these messages can arrive in any order in IMS
Connect
12. OTMA deletes the TIB control block
Understanding IMS OTMA Commit Mode and Synchronization Level 27
28. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL0 – Syncpoint Fail
15. Syncpoint fails
• The application abends
15. IMS Connect processes the syncpoint failure
• IMS Connect discards the reply message
• IMS Connect sends the DSFxxx message to the IMS Connect Client
15. If this is a persistent socket IMS Connect keeps the connection open
and does not free the SVT control block
16. The ICON Client processes the DSFxxx message
Understanding IMS OTMA Commit Mode and Synchronization Level 28
29. IMS Regional User Group
Client Interface
OTMA Commit Mode
– Commit Mode 1 - Send-then-commit
• For Synclevel 1 (SL1) the OTMA client gets the message and has
to send an ACK for syncpoint to continue but it should still not
process the message until it receives the de-allocate response
– ICON will send the message to the ICON Client and wait for the ACK
from the ICON Client which is then sent to OTMA
• There is a timeout in OTMA waiting for the ACK
– The ICON client will get another output after IMS Connect receives the
de-allocate message from OTMA (unless in conversation)
• RC4, Reason Code x’97’ – de-allocate confirmed
• RC4, Reason Code x’96’ – de-allocate abort
Understanding IMS OTMA Commit Mode and Synchronization Level 29
31. IMS Regional User Group
OTMA Client Interface – IMS Connect
CM1 SL1 – ACK – Syncpoint OK
ICON CLIENT ICON OTMA MPR
SVT TIB
REPLY
ON SVT
SEND
REPLY
READ
TCP/IP WRITE
REPLY 11
SEND ACK
READ
12 TCP/IP WRITE
ACK
HOLD
REPLY
XCF SEND
13
XCF SEND
14
ACK
Understanding IMS OTMA Commit Mode and Synchronization Level 31
32. IMS Regional User Group
OTMA Client Interface – IMS Connect
CM1 SL1 – ACK – Syncpoint OK
ICON CLIENT ICON OTMA MPR
SVT XCF SEND TIB
ACK
PROCESS
SYNC
15
SYNC OK
16
XCF SEND
XCF SEND 17
DEALLOCATE
CONFIRM
FREE TIB
SEND
TCP/IP WRITE DEALLOC 18 SYNC
DEALLOCATE
CONFIRM 20 COMPLETE
KEEP/FREE
19
PROCESS SVT
REPLY
21
22
Understanding IMS OTMA Commit Mode and Synchronization Level 32
33. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint OK
1. An IMS Connect Client sends a CM1 SL1 input message to ICON
2. IMS Connect allocates a control block for the Client (SVT) if it does
not already exist and sends the input message to IMS OTMA via
XCF
• The TPIPE name is the Port number that received the input message
1. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
Understanding IMS OTMA Commit Mode and Synchronization Level 33
34. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint OK
4. The IMS transaction does a GU to the IOPCB to retrieve the input
message
5. The IMS transaction ISRTs the reply message to the IOPCB
6. The reply message is anchored on the TIB
7. The IMS application reaches a syncpoint (GU IOPCB, termination)
Understanding IMS OTMA Commit Mode and Synchronization Level 34
35. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint OK
8. IMS OTMA retrieves the reply message from the message queue
9. IMS OTMA sends the reply message to IMS Connect via XCF
• IMS OTMA waits for an ACK/NAK
• Syncpoint processing is held
• The MPR is occupied
• Database locks are held
• External subsystem (DB2, MQ, etc.) locks are held
8. IMS Connect anchors the reply message on the SVT
Understanding IMS OTMA Commit Mode and Synchronization Level 35
36. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint OK
11. IMS Connect sends the reply message to the IMS Connect Client
• IMS Connect waits for the ACK/NAK
12. The IMS Connect Client gets the reply message and sends an ACK
13. The IMS Connect Client holds the message waiting for the
De-Allocate message to see if syncpoint completed successfully
14. IMS Connect sends the ACK to OTMA
Understanding IMS OTMA Commit Mode and Synchronization Level 36
37. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint OK
15. Syncpoint proceeds
16. Syncpoint completes successfully
17. OTMA sends the De-Allocate Confirm to IMS Connect
18. OTMA deletes the TIB control block
19. Syncpoint completes
20. IMS Connect sends the De-Allocate Confirm to the IMS Connect
Client
21. If this is a persistent socket IMS Connect keeps the connection open
and does not free the SVT control block
22. The ICON Client processes the reply message
Understanding IMS OTMA Commit Mode and Synchronization Level 37
41. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint Fail
1. An IMS Connect Client sends a CM1 SL1 input message to ICON
2. IMS Connect allocates a control block for the Client (SVT) if it does
not already exist and sends the input message to IMS OTMA via
XCF
• The TPIPE name is the Port number that received the input message
1. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
Understanding IMS OTMA Commit Mode and Synchronization Level 41
42. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint Fail
4. The IMS transaction does a GU to the IOPCB to retrieve the input
message
5. The IMS transaction ISRTs the reply message to the IOPCB
6. The reply message is anchored on the TIB
7. The IMS application reaches a syncpoint (GU IOPCB, termination)
Understanding IMS OTMA Commit Mode and Synchronization Level 42
43. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint Fail
8. IMS OTMA retrieves the reply message from the message queue
9. IMS OTMA sends the reply message to IMS Connect via XCF
• IMS OTMA waits for an ACK/NAK
• Syncpoint processing is held
• The MPR is occupied
• Database locks are held
• External subsystem (DB2, MQ, etc.) locks are held
8. IMS Connect anchors the reply message on the SVT
Understanding IMS OTMA Commit Mode and Synchronization Level 43
44. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint Fail
11. IMS Connect sends the reply message to the IMS Connect Client
• IMS Connect waits for the ACK/NAK
12. The IMS Connect Client gets the reply message and sends an ACK
13. The IMS Connect Client holds the message waiting for the
De-Allocate message to see if syncpoint completed successfully
14. IMS Connect sends the ACK to OTMA
Understanding IMS OTMA Commit Mode and Synchronization Level 44
45. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint Fail
15. Syncpoint proceeds
16. Syncpoint fails
17. OTMA processes the failed syncpoint
• OTMA sends the DFSxxx message to IMS Connect via XCF
• OTMA sends the De-Allocate Abort to IMS Connect via XCF
• Because this is XCF these messages can arrive in any order in IMS
Connect
16. OTMA deletes the TIB control block
Understanding IMS OTMA Commit Mode and Synchronization Level 45
46. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – ACK – Syncpoint Fail
19. Syncpoint fails
• The application abends
19. IMS Connect processes the failed syncpoint
• IMS Connect sends the DSFxxx message to the IMS Connect Client
19. If this is a persistent socket IMS Connect keeps the connection open
and does not free the SVT control block
20. The ICON Client processes the failed syncpoint
• The ICON Client discards the reply message
• The ICON Client processes the DSFxxx message
Understanding IMS OTMA Commit Mode and Synchronization Level 46
50. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – Client NAK
1. An IMS Connect Client sends a CM1 SL1 input message to ICON
2. IMS Connect allocates a control block for the Client (SVT) if it does
not already exist and sends the input message to IMS OTMA via
XCF
• The TPIPE name is the Port number that received the input message
1. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
Understanding IMS OTMA Commit Mode and Synchronization Level 50
51. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – Client NAK
4. The IMS transaction does a GU to the IOPCB to retrieve the input
message
5. The IMS transaction ISRTs the reply message to the IOPCB
6. The reply message is anchored on the TIB
7. The IMS application reaches a syncpoint (GU IOPCB, termination)
Understanding IMS OTMA Commit Mode and Synchronization Level 51
52. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – Client NAK
8. IMS OTMA retrieves the reply message from the message queue
9. IMS OTMA sends the reply message to IMS Connect via XCF
• IMS OTMA waits for an ACK/NAK
• Syncpoint processing is held
• The MPR is occupied
• Database locks are held
• External subsystem (DB2, MQ, etc.) locks are held
8. IMS Connect anchors the reply message on the SVT
Understanding IMS OTMA Commit Mode and Synchronization Level 52
53. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – Client NAK
11. IMS Connect sends the reply message to the IMS Connect Client
• IMS Connect waits for the ACK/NAK
12. The IMS Connect Client gets the reply message and sends a NAK
13. The IMS Connect Client discards the reply message and waits for the
De-Allocate message
14. IMS Connect sends the NAK to OTMA
Understanding IMS OTMA Commit Mode and Synchronization Level 53
54. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – Client NAK
15. Syncpoint proceeds
16. Syncpoint fails
17. OTMA processes the failed syncpoint
• OTMA sends the DFSxxx message to IMS Connect via XCF
• OTMA sends the De-Allocate Abort to IMS Connect via XCF
• Because this is XCF these messages can arrive in any order in IMS
Connect
16. OTMA deletes the TIB control block
Understanding IMS OTMA Commit Mode and Synchronization Level 54
55. IMS Regional User Group
Client Interface
IMS Connect – CM1 SL1 – Client NAK
19. Syncpoint fails
• The application abends
19. IMS Connect processes the failed syncpoint
• IMS Connect sends the DSFxxx message to the IMS Connect Client
19. If this is a persistent socket IMS Connect keeps the connection open
and does not free the SVT control block
20. The ICON Client processes the DSFxxx message
Understanding IMS OTMA Commit Mode and Synchronization Level 55
58. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Syncpoint OK
1. A WebSphere MQ application does an MQPUT to an IMS Bridge Queue
2. The IMS Bridge code in the WebSphere MQ Queue Manager has an
outstanding MQGET In Syncpoint for the IMS Bridge Queue and
receives input the message
• WebSphere MQ sends the input message to IMS OTMA via XCF
3. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
• Sends an ACK for the input message to WebSphere MQ
Understanding IMS OTMA Commit Mode and Synchronization Level 58
59. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Syncpoint OK
4. WebSphere MQ does an MQCMIT and the input message is
dequeued
5. The IMS transaction does a GU to the IOPCB to retrieve the input
message
6. The IMS transaction ISRTs the reply message to the IOPCB
7. The reply message is anchored on the TIB
8. The IMS application reaches a syncpoint (GU IOPCB, termination)
9. IMS OTMA Retrieves the reply message from the message queue
Understanding IMS OTMA Commit Mode and Synchronization Level 59
60. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Syncpoint OK
10. IMS OTMA sends the reply message to WebSphere MQ via XCF
• IMS OTMA waits for an ACK/NAK
• Syncpoint processing is held
• The MPR is occupied
• Database locks are held
• External subsystem (DB2, MQ, etc.) locks are held
10. The WebSphere MQ IMS Bridge MQPUTs the reply message to the
Reply-To Queue In Syncpoint but does not commit
• If the MQPUT to the Reply-To Queue fails the message is MQPUT to the
Dead Letter Queue
Understanding IMS OTMA Commit Mode and Synchronization Level 60
61. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Syncpoint OK
12. The WebSphere MQ IMS Bridge sends an ACK to OTMA for the reply
message
13. Syncpoint proceeds
14. Syncpoint completes successfully
15. OTMA sends the De-Allocate Confirm to WebSphere MQ
16. OTMA deletes the TIB control block
17. Syncpoint completes
18. The WebSphere MQ IMS Bridge MQCMITs the reply message
19. The WebSphere MQ application MQGETs the reply message from the
Reply-to Queue
Understanding IMS OTMA Commit Mode and Synchronization Level 61
64. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Syncpoint Fail
1. A WebSphere MQ application does an MQPUT to an IMS Bridge Queue
2. The IMS Bridge code in the WebSphere MQ Queue Manager has an
outstanding MQGET In Syncpoint for the IMS Bridge Queue and
receives input the message
• WebSphere MQ sends the input message to IMS OTMA via XCF
3. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
• Sends an ACK for the input message to WebSphere MQ
Understanding IMS OTMA Commit Mode and Synchronization Level 64
65. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Syncpoint Fail
4. WebSphere MQ does an MQCMIT and the input message is
dequeued
5. The IMS transaction does a GU to the IOPCB to retrieve the input
message
6. The IMS transaction ISRTs the reply message to the IOPCB
7. The reply message is anchored on the TIB
8. The IMS application reaches a syncpoint (GU IOPCB, termination)
9. IMS OTMA Retrieves the reply message from the message queue
Understanding IMS OTMA Commit Mode and Synchronization Level 65
66. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Syncpoint Fail
10. IMS OTMA sends the reply message to WebSphere MQ via XCF
• IMS OTMA waits for an ACK/NAK
• Syncpoint processing is held
• The MPR is occupied
• Database locks are held
• External subsystem (DB2, MQ, etc.) locks are held
10. The WebSphere MQ IMS Bridge MQPUTs the reply message to the
Reply-To Queue In Syncpoint but does not commit
• If the MQPUT to the Reply-To Queue fails the message is MQPUT to the
Dead Letter Queue
Understanding IMS OTMA Commit Mode and Synchronization Level 66
67. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Syncpoint Fail
12. The WebSphere MQ IMS Bridge sends an ACK to OTMA for the reply
message
13. Syncpoint proceeds
14. Syncpoint fails
15. OTMA processes the failed syncpoint
• OTMA sends the DFSxxx message to WebSphere MQ
• OTMA sends the De-Allocate Confirm to WebSphere MQ
• Because this us XCF these messages can arrive in any order in
WebSphere MQ
12. OTMA deletes the TIB control block
13. Syncpoint fails
• The application abends
Understanding IMS OTMA Commit Mode and Synchronization Level 67
68. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Syncpoint Fail
18. WebSphere MQ processes the failed syncpoint
• The WebSphere MQ IMS Bridge MQBACKs the reply message
• The WebSphere MQ IMS Bridge MQPUTs the DFSxxx message to the
Reply-to Queue
• The WebSphere MQ IMS Bridge MQCMITs the DFSxxx message on the
Reply-to Queue
18. The WebSphere MQ application MQGETs the DFSxxx message from
the Reply-to Queue
Understanding IMS OTMA Commit Mode and Synchronization Level 68
71. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Client NAK
1. A WebSphere MQ application does an MQPUT to an IMS Bridge Queue
2. The IMS Bridge code in the WebSphere MQ Queue Manager has an
outstanding MQGET In Syncpoint for the IMS Bridge Queue and
receives input the message
WebSphere MQ sends the input message to IMS OTMA via XCF
3. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
• Sends an ACK for the input message to WebSphere MQ
Understanding IMS OTMA Commit Mode and Synchronization Level 71
72. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Client NAK
4. WebSphere MQ does an MQCMIT and the input message is
dequeued
5. The IMS transaction does a GU to the IOPCB to retrieve the input
message
6. The IMS transaction ISRTs the reply message to the IOPCB
7. The reply message is anchored on the TIB
8. The IMS application reaches a syncpoint (GU IOPCB, termination)
9. IMS OTMA Retrieves the reply message from the message queue
Understanding IMS OTMA Commit Mode and Synchronization Level 72
73. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Client NAK
10. IMS OTMA sends the reply message to WebSphere MQ via XCF
• IMS OTMA waits for an ACK/NAK
• Syncpoint processing is held
• The MPR is occupied
• Database locks are held
• External subsystem (DB2, MQ, etc.) locks are held
10. The WebSphere MQ IMS Bridge tries to MQPUT the reply message to
the Reply-To Queue but it fails
• WebSphere MQ tries to MQPUT the reply message to the Dead Letter
Queue but it fails
Understanding IMS OTMA Commit Mode and Synchronization Level 73
74. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Client NAK
12. The WebSphere MQ IMS Bridge sends a NAK to OTMA for the reply
message
13. Syncpoint proceeds
14. Syncpoint fails
15. OTMA processes the failed syncpoint
• OTMA sends the DFSxxx message to WebSphere MQ
• OTMA sends the De-Allocate Abort to WebSphere MQ
• Because this us XCF these messages can arrive in any order in
WebSphere MQ
12. OTMA deletes the TIB control block
13. Syncpoint fails
• The application abends
Understanding IMS OTMA Commit Mode and Synchronization Level 74
75. IMS Regional User Group
Client Interface
WebSphere MQ – CM1 SL1 – Client NAK
18. The WebSphere MQ IMS Bridge tries to MQPUT and MQCMIT the
DFSxxx message to the Reply-to Queue
• If that fails the WebSphere MQ IMS Bridge tries to MQPUT and MQCMIT
the DFSxxx message to the Dead Letter Queue
• If that fails the DFSxxx message is discarded
18. The WebSphere MQ application MQGETs the DFSxxx message from
the Reply-to Queue
Understanding IMS OTMA Commit Mode and Synchronization Level 75
76. IMS Regional User Group
Client Interface
OTMA Commit Mode
– Commit Mode 0 (CM0) - Commit-then-send
• Output is queued
• IMS sends the output after syncpoint is complete
• Queued on a control block called a QAB (Queue Anchor Block)
– The destination name is x’FEFFFFFFaaaaaaaa’
• aaaaaaaa is the address of a CLB associated with the QAB
• Not the address of the QAB control block
• OTMA always requires an ACK to dequeue the output message
– Synclevel 1
• ALTPCB output messages are always Commit Mode 0
• MQSeries calls these “asynchronous” messages
– The output is “asynchronous” from syncpoint completion
Understanding IMS OTMA Commit Mode and Synchronization Level 76
77. IMS Regional User Group
Client Interface
OTMA Commit Mode
– IMS V11 introduces Timeout waiting for an ACK for a CM0 SL1
output message
• The output queue is being held
– When the timeout is reached the output message causing the
hang is moved to a special timeout queue TPIPE for that
TMEMBER
• The original output queue is now free to continue
Understanding IMS OTMA Commit Mode and Synchronization Level 77
78. IMS Regional User Group
Client Interface
OTMA Commit Mode
– The same timeout value is used for both CM0 ACK timeout and
CM1 ACK timeout
– Can be specified in seconds (0-255) in 4 ways
• In the Client Bid
• T/O= parameter in DFSYDTx
• /STA TMEMBER xxxx TIMEOUT nnn
• By message in the OTMA header
– If less than the T/O or /STA value
– The default is 120 seconds
Understanding IMS OTMA Commit Mode and Synchronization Level 78
79. IMS Regional User Group
Client Interface
OTMA Commit Mode
– The timeout value can not be specified via Client Bid for
MQSeries or OTMA C/I
– IMS Connect has the ACKTO parameter on the Datastore
control card which is the value used by IMS Connect for Client
Bid
– Can be turned off by T/O=0
or /STA TMEMBER xxxx
TIMEOUT 0
• Can not be turned off for a message using the OTMA header or by
Client Bid
Understanding IMS OTMA Commit Mode and Synchronization Level 79
80. IMS Regional User Group
Client Interface
OTMA Commit Mode
– The OTMA client can specify a CM0 ACK timeout TPIPE name
during Client Bid
• Currently only supported by IMS Connect
• The default TPIPE name is DFS$$TOQ
• IMS Connect has the CM0ATOQ parameter on the HWS control
card in the HWSCFGxx member and on the Datastore control card
– This specifies the TPIPE name
Understanding IMS OTMA Commit Mode and Synchronization Level 80
81. IMS Regional User Group
Client Interface
OTMA Commit Mode
– For IMS Connect the message is queued to a Hold queue
• If a Reroute TPIPE name was specified on the input message the
output message is queued to that TPIPE
• If a Reroute TPIPE name was not specified the message is
queued to the TPIPE name specified in the CM0ATOQ parameter
– If this parameter was not set the message is queued to TPIPE DFS$
$TOQ
Understanding IMS OTMA Commit Mode and Synchronization Level 81
84. IMS Regional User Group
Client Interface
IMS Connect – CM0 SL1 – ACK
1. An IMS Connect Client sends a CM0 SL1 input message to ICON
2. IMS Connect builds a control block for the Client (SVT) if it does not
already exist and sends the input message to IMS OTMA via XCF
• The TPIPE name is the Client ID
1. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
• Frees the TIB after the message is enqueued
Understanding IMS OTMA Commit Mode and Synchronization Level 84
85. IMS Regional User Group
Client Interface
IMS Connect – CM0 SL1 – ACK
4. The IMS transaction does a GU to the IOPCB to retrieve the input
message
5. The IMS transaction ISRTs the reply message to the IOPCB
6. The message is enqueued on a temporary queue
7. The IMS application reaches a syncpoint (GU IOPCB, termination)
8. Syncpoint proceeds
9. OTMA enqueues the reply message on a QAB (Queue Anchor Block)
10. Syncpoint is successful
11. Syncpoint completes
Understanding IMS OTMA Commit Mode and Synchronization Level 85
86. IMS Regional User Group
Client Interface
IMS Connect – CM0 SL1 – ACK
12. IMS OTMA does an internal GU to retrieve the reply message
13. IMS OTMA sends the reply message to IMS Connect via XCF
14. IMS Connect anchors the reply message on the SVT
15. IMS Connect sends the reply message to the IMS Connect Client
• IMS Connect waits for the ACK/NAK
15. The IMS Connect Client gets the reply message and sends an ACK
16. The IMS Connect Client can process the message
17. IMS Connect sends the ACK to OTMA
18. OTMA de-queues the reply message
Understanding IMS OTMA Commit Mode and Synchronization Level 86
89. IMS Regional User Group
Client Interface
IMS Connect – CM0 SL1 – Client NAK
1. An IMS Connect Client sends a CM0 SL1 input message to ICON
2. IMS Connect builds a control block for the Client (SVT) if it does not
already exist and sends the input message to IMS OTMA via XCF
• The TPIPE name is the Client ID
1. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
• Frees the TIB after the message is enqueued
Understanding IMS OTMA Commit Mode and Synchronization Level 89
90. IMS Regional User Group
Client Interface
IMS Connect – CM0 SL1 – Client NAK
4. The IMS transaction does a GU to the IOPCB to retrieve the input
message
5. The IMS transaction ISRTs the reply message to the IOPCB
6. The message is enqueued on a temporary queue
7. The IMS application reaches a syncpoint (GU IOPCB, termination)
8. Syncpoint proceeds
9. OTMA enqueues the reply message on a QAB (Queue Anchor Block)
10. Syncpoint is successful
11. Syncpoint completes
Understanding IMS OTMA Commit Mode and Synchronization Level 90
91. IMS Regional User Group
Client Interface
IMS Connect – CM0 SL1 – Client NAK
12. IMS OTMA does an internal GU to retrieve the reply message
13. IMS OTMA sends the reply message to IMS Connect via XCF
14. IMS Connect anchors the reply message on the SVT
15. IMS Connect sends the reply message to the IMS Connect Client
• IMS Connect waits for the ACK/NAK
15. The IMS Connect Client gets the reply message and sends a NAK
16. The IMS Connect Client notifies the User
17. IMS Connect sends the NAK to OTMA
18. OTMA re-queues, or purges, or reroutes the reply message
Understanding IMS OTMA Commit Mode and Synchronization Level 91
94. IMS Regional User Group
Client Interface
WebSphere MQ – CM0 SL1 – ACK
1. A WebSphere MQ application does an MQPUT to an IMS Bridge Queue
2. The IMS Bridge code in the WebSphere MQ Queue Manager has an
outstanding MQGET In Syncpoint for the IMS Bridge Queue and
receives input the message
• WebSphere MQ sends the input message to IMS OTMA via XCF
3. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
• Sends an ACK for the input message to WebSphere MQ
• Frees the TIB after the message is enqueued
Understanding IMS OTMA Commit Mode and Synchronization Level 94
95. IMS Regional User Group
Client Interface
WebSphere MQ – CM0 SL1 – ACK
4. WebSphere MQ does an MQCMIT and the input message is
de-queued
5. The IMS transaction does a GU to the IOPCB to retrieve the input
message
6. The IMS transaction ISRTs the reply message to the IOPCB
7. The reply message is enqueued on a temporary queue
8. The IMS application reaches a syncpoint (GU IOPCB, termination)
9. Syncpoint proceeds
10. OTMA enqueues the reply message on a QAB (Queue Anchor Block)
11. Syncpoint is successful
12. Syncpoint completes
Understanding IMS OTMA Commit Mode and Synchronization Level 95
96. IMS Regional User Group
Client Interface
WebSphere MQ – CM0 SL1 – ACK
13. IMS OTMA does an internal GU to retrieve the reply message
14. IMS OTMA sends the reply message to WebSphere MQ via XCF
15. The WebSphere MQ IMS Bridge MQPUTs the reply message to the
Reply-To Queue In Syncpoint
• If the MQPUT to the Reply-To Queue fails the message is MQPUT to the
Dead Letter Queue
13. The WebSphere MQ IMS Bridge MQCMITs the reply message
14. The WebSphere MQ IMS Bridge sends an ACK to OTMA for the reply
message
15. OTMA de-queues the reply message
16. The WebSphere MQ application MQGETs the reply message from the
Reply-to Queue
Understanding IMS OTMA Commit Mode and Synchronization Level 96
99. IMS Regional User Group
Client Interface
WebSphere MQ – CM0 SL1 – Client NAK
1. A WebSphere MQ application does an MQPUT to an IMS Bridge Queue
2. The IMS Bridge code in the WebSphere MQ Queue Manager has an
outstanding MQGET In Syncpoint for the IMS Bridge Queue and
receives input the message
• WebSphere MQ sends the input message to IMS OTMA via XCF
3. OTMA processes the input message
• Allocates the TIB
• Calls RACF if needed
• Inserts the input message to the IMS Message Queue
• Enqueues the input message on the transaction queue
• Sends an ACK for the input message to WebSphere MQ
• Frees the TIB after the message is enqueued
Understanding IMS OTMA Commit Mode and Synchronization Level 99
100. IMS Regional User Group
Client Interface
WebSphere MQ – CM0 SL1 – Client NAK
4. WebSphere MQ does an MQCMIT and the input message is
dequeued
5. The IMS transaction does a GU to the IOPCB to retrieve the input
message
6. The IMS transaction ISRTs the reply message to the IOPCB
7. The reply message is enqueued on a temporary queue
8. The IMS application reaches a syncpoint (GU IOPCB, termination)
9. Syncpoint proceeds
10. OTMA enqueues the reply message on a QAB (Queue Anchor Block)
11. Syncpoint is successful
12. Syncpoint completes
Understanding IMS OTMA Commit Mode and Synchronization Level 100
101. IMS Regional User Group
Client Interface
WebSphere MQ – CM0 SL1 – Client NAK
13. IMS OTMA does an internal GU to retrieve the reply message
14. IMS OTMA sends the reply message to WebSphere MQ via XCF
15. The MQPUT to the Reply-To Queue and the Dead Letter Queue both
fail
16. The WebSphere MQ IMS Bridge sends a NAK to OTMA for the reply
message
17. OTMA re-queues the reply message on the QAB
• Purge and re-route options are not supported
Understanding IMS OTMA Commit Mode and Synchronization Level 101
102. IMS Regional User Group
Client Interface
Additional flows
– For completeness there are four additional flows
• OTMA NAK input message
– IMS Connect
– WebSphere MQ
• ABEND before syncpoint
– IMS Connect
• Send DFSxxx instead of reply message
– WebSphere MQ
• Send DFSxxx instead of reply message
Understanding IMS OTMA Commit Mode and Synchronization Level 102
104. IMS Regional User Group
Client Interface
IMS Connect – OTMA NAK Input Message
1. An IMS Connect Client sends an input message to ICON
2. IMS Connect allocates a control block for the Client (SVT) if it does
not already exist and sends the input message to IMS OTMA via
XCF
3. OTMA processes the input message but there is an error
• TIB/TPIPE flood control
• No such transaction code
• Transaction stopped
• Security failed
• Message expired
• And many more
Understanding IMS OTMA Commit Mode and Synchronization Level 104
105. IMS Regional User Group
Client Interface
IMS Connect – OTMA NAK Input Message
4. OTMA NAKs the input message with a Sense Code and Reason
Code
• TMAMCSNC and TMAMCRSC in the OTMA header
• See macro DFSYMSG for a complete list of sense codes
4. OTMA sends the NAK to IMS Connect via XCF
5. OTMA deletes the TIB control block if it was allocated
6. IMS Connect sends an error message to the IMS Connect Client
• *REQSTS* if using IMS Connect sample User Message Exits
8. If this is a persistent socket IMS Connect keeps the connection open
and does not free the SVT control block
9. The ICON Client processes the error
Understanding IMS OTMA Commit Mode and Synchronization Level 105
107. IMS Regional User Group
Client Interface
WebSphere MQ – OTMA NAK Input Message
1. A WebSphere MQ application does an MQPUT to an IMS Bridge Queue
2. The IMS Bridge code in the WebSphere MQ Queue Manager has an
outstanding MQGET In Syncpoint for the IMS Bridge Queue and
receives input the message
• WebSphere MQ sends the input message to IMS OTMA via XCF
3. OTMA processes the input message but there is an error
• TIB/TPIPE flood control
• No such transaction code
• Transaction stopped
• Security failed
• Message expired
• And many more
Understanding IMS OTMA Commit Mode and Synchronization Level 107
108. IMS Regional User Group
Client Interface
WebSphere MQ – OTMA NAK Input Message
4. OTMA NAKs the input message with a Sense Code and Reason
Code
• TMAMCSNC and TMAMCRSC in the OTMA header
• See macro DFSYMSG for a complete list of sense codes
4. OTMA sends the NAK to WebSphere MQ via XCF
5. OTMA deletes the TIB control block if it was allocated
6. WebSphere MQ processes the NAK
Understanding IMS OTMA Commit Mode and Synchronization Level 108
109. IMS Regional User Group
Client Interface
WebSphere MQ – OTMA NAK Input Message
7. WebSphere MQ processes the NAK
• If it was an invalid message before sending to OTMA
– The input message goes on the DLQ
– A warning is sent to the system console
• If IMS rejected the message with sense 001A
– The DFS message from IMS goes to the Reply-to Queue
– If the DFS message can not be put on the Reply-to Queue it goes to the DLQ
– The input message goes to the DLQ
• IMS rejected the message due to a message error
– The input message goes on the DLQ
– A warning message is sent to the system console
Understanding IMS OTMA Commit Mode and Synchronization Level 109
110. IMS Regional User Group
Client Interface
WebSphere MQ – OTMA NAK Input Message
7. WebSphere MQ processes the NAK
• If IMS rejected the message for other reasons
– The input message goes back to the original queue
– A warning is sent to the system console
• If there is a queue problem
– The queue is Stopped
• If there is an IMS Bridge problem
– The IMS Bridge is stopped
Understanding IMS OTMA Commit Mode and Synchronization Level 110
111. IMS Regional User Group
Client Interface
OTMA Commit Mode
– Commit Mode 1 - Send-then-commit
• A CM1 input message which does ISRT - PURG - ISRT - PURG -
ISRT - PURG to the IOPCB will generate one multi-segment output
message
– Not 3 single segment output messages
– A CM0 input would have generated 3 single-segment messages
– The maximum size of the output message is 32K
• If it is larger the transaction will ABEND – U0119
• In IMS V10 (PK60549) you have the option to make CM0 messages
also ignore the PURG call and generate one multi-segment
message
– Specified in the OTMA header for an input message
• Set bit x’02’ (TMAMIPRG) on in flag TMAMHCFL
– Supported by IMS Connect and ITRA
Understanding IMS OTMA Commit Mode and Synchronization Level 111