Understanding IMS OTMA Commit Mode - IMS UG October 2012 Hartford

872 views
794 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
872
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
38
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Understanding IMS OTMA Commit Mode - IMS UG October 2012 Hartford

  1. 1. Understanding IMS OTMA Commit Mode and Synchronization Level IMS User GroupSteve Nathansnathan@us.ibm.com ©2012 IBM Corporation
  2. 2. IMS Regional User GroupDisclaimer © Copyright IBM Corporation [current year]. All rights reserved. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN ADDITION, THIS INFORMATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM WITHOUT NOTICE. IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, NOR SHALL HAVE THE EFFECT OF, CREATING ANY WARRANTIES OR REPRESENTATIONS FROM IBM (OR ITS SUPPLIERS OR LICENSORS), OR ALTERING THE TERMS AND CONDITIONS OF ANY AGREEMENT OR LICENSE GOVERNING THE USE OF IBM PRODUCTS AND/OR SOFTWARE.IBM, the IBM logo, ibm.com, and IMS are trademarks or registered trademarks of International BusinessMachines Corporation in the United States, other countries, or both. If these and other IBM trademarked termsare marked on their first occurrence in this information with a trademark symbol (® or ™), these symbolsindicate U.S. registered or common law trademarks owned by IBM at the time this information was published.Such trademarks may also be registered or common law trademarks in other countries. A current list of IBMtrademarks is available on the Web at “Copyright and trademark information” atwww.ibm.com/legal/copytrade.shtml Understanding IMS OTMA Commit Mode and Synchronization Level 2
  3. 3. IMS Regional User GroupIntroduction 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. 4. IMS Regional User GroupIntroduction 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. 5. IMS Regional User Group SERVER z/OS,WIN, AIX, SUN, … z/OS z/OSIMS 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 SNAMQSeries TN3270 MQSeries BTAM <V10 VTAM LU1 VTAM LU2 LU 6.1 LU 6.2End User Understanding IMS OTMA Commit Mode and Synchronization Level 5
  6. 6. IMS Regional User GroupIntroduction XCF GROUP ICON1 GRNAME=GR1 IMSA TMEMBER1 TPIPEs 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 TPIPEs Storage TMEMBER4 Class Understanding IMS OTMA Commit Mode and Synchronization Level 6
  7. 7. IMS Regional User GroupTPIPEs (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. 8. IMS Regional User GroupClient 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. 9. IMS Regional User GroupClient 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 Understanding IMS OTMA Commit Mode and Synchronization Level 9
  10. 10. IMS Regional User GroupClient 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. 11. IMS Regional User GroupClient 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. 12. IMS Regional User GroupClient 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. 13. IMS Regional User GroupClient 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. 14. IMS Regional User GroupClient 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” – 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
  15. 15. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL0 – Syncpoint OK ICON CLIENT ICON OTMA MPR TCP/IP WRITE IMS CONNECT CM1 SL0 Message WRITE XCF SEND ALLOC TIB Queue (ALLOC READ CM1 SL0 CALL RACF SVT) XCF SEND ISRT MSG 1 ENQ MSG GU IOPCB 2 3 4 SVT TIB ISRT IOPCB ANCHOR 5 MSG on TIB 6 START SYNC 7 GET MSG 8 XCF SEND REPLY XCF SEND ANCHOR REPLY 9 ON SVT 10 Understanding IMS OTMA Commit Mode and Synchronization Level 15
  16. 16. IMS Regional User GroupOTMA 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 TCP/IP WRITE SYNC REPLY 16 COMPLETE 15 KEEP/FREE PROCESS SVT REPLY 17 18 Understanding IMS OTMA Commit Mode and Synchronization Level 16
  17. 17. IMS Regional User GroupClient 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 3. 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. 18. IMS Regional User GroupClient 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” 5. The IMS transaction ISRTs the reply message to the IOPCB • X’03’ log record – output message 6. 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. 19. IMS Regional User GroupClient 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” 9. 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 10. IMS Connect anchors the reply message on the SVT waiting for the De- Allocate Understanding IMS OTMA Commit Mode and Synchronization Level 19
  20. 20. IMS Regional User GroupClient 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. 21. IMS Regional User GroupClient Interface IMS Connect – CM1 SL0 – Syncpoint OK 15. Syncpoint completes • X’5612’ log record – end Phase 2 syncpoint 16. IMS Connect sends the reply message to the IMS Connect Client 17. If this is a persistent socket IMS Connect keeps the connection open and does not free the SVT control block 18. The ICON Client processes the reply message Understanding IMS OTMA Commit Mode and Synchronization Level 21
  22. 22. IMS Regional User GroupClient 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
  23. 23. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL0 – Syncpoint Fail ICON CLIENT ICON OTMA MPR TCP/IP WRITE IMS CONNECT CM1 SL0 Message WRITE XCF SEND ALLOC TIB Queue (ALLOC READ CM1 SL0 CALL RACF SVT) XCF SEND ISRT MSG 1 ENQ MSG GU IOPCB 2 3 4 SVT TIB ISRT IOPCB ANCHOR 5 MSG on TIB 6 START SYNC 7 GET MSG 8 XCF SEND REPLY XCF SEND ANCHOR REPLY 9 ON SVT 10 Understanding IMS OTMA Commit Mode and Synchronization Level 23
  24. 24. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL0 – Syncpoint Fail ICON CLIENT ICON OTMA MPR SVT TIB PROCESS SYNC 11 SYNC FAIL 12 XCF SEND XCF SEND DFSxxx XCF SEND XCF SEND DISCARD DEALLOCATE REPLY ABORT 13 SEND FREE TIB DFSxxx APPL 14 ABEND TCP/IP WRITE 16 DFSxxx 15 KEEP/FREE PROCESS SVT DFSxxx 17 18 Understanding IMS OTMA Commit Mode and Synchronization Level 24
  25. 25. IMS Regional User GroupClient 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 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 Understanding IMS OTMA Commit Mode and Synchronization Level 25
  26. 26. IMS Regional User GroupClient 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. 27. IMS Regional User GroupClient 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 14. OTMA deletes the TIB control block Understanding IMS OTMA Commit Mode and Synchronization Level 27
  28. 28. IMS Regional User GroupClient Interface IMS Connect – CM1 SL0 – Syncpoint Fail 15. Syncpoint fails • The application abends 16. IMS Connect processes the syncpoint failure • IMS Connect discards the reply message • IMS Connect sends the DSFxxx message to the IMS Connect Client 17. If this is a persistent socket IMS Connect keeps the connection open and does not free the SVT control block 18. The ICON Client processes the DSFxxx message Understanding IMS OTMA Commit Mode and Synchronization Level 28
  29. 29. IMS Regional User GroupClient 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
  30. 30. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL1 – ACK – Syncpoint OKICON CLIENT ICON OTMA MPR TCP/IP WRITE IMS CONNECT CM1 SL1 Message WRITE XCF SEND ALLOC TIB Queue (ALLOC READ CM1 SL1 CALL RACF SVT) XCF SEND ISRT MSG 1 ENQ MSG GU IOPCB 2 3 4 SVT TIB ISRT IOPCB ANCHOR 5 MSG on TIB 6 START SYNC 7 GET MSG 8 XCF SEND REPLY XCF SEND ANCHOR REPLY 9 ON SVT 10 Understanding IMS OTMA Commit Mode and Synchronization Level 30
  31. 31. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL1 – ACK – Syncpoint OKICON 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 14 XCF SEND ACK Understanding IMS OTMA Commit Mode and Synchronization Level 31
  32. 32. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL1 – ACK – Syncpoint OKICON 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 DEALLOCATE SYNC CONFIRM 20 COMPLETE 19 KEEP/FREE PROCESS SVT REPLY 21 22 Understanding IMS OTMA Commit Mode and Synchronization Level 32
  33. 33. IMS Regional User GroupClient 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 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 Understanding IMS OTMA Commit Mode and Synchronization Level 33
  34. 34. IMS Regional User GroupClient 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. 35. IMS Regional User GroupClient 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 10. IMS Connect anchors the reply message on the SVT Understanding IMS OTMA Commit Mode and Synchronization Level 35
  36. 36. IMS Regional User GroupClient 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. 37. IMS Regional User GroupClient 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
  38. 38. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL1 – ACK – Syncpoint FailICON CLIENT ICON OTMA MPR TCP/IP WRITE IMS CONNECT CM1 SL1 Message WRITE XCF SEND ALLOC TIB Queue (ALLOC READ CM1 SL1 CALL RACF SVT) XCF SEND ISRT MSG 1 ENQ MSG GU IOPCB 2 3 4 SVT TIB ISRT IOPCB ANCHOR 5 MSG on TIB 6 START SYNC 7 GET MSG 8 XCF SEND REPLY XCF SEND ANCHOR REPLY 9 ON SVT 10 Understanding IMS OTMA Commit Mode and Synchronization Level 38
  39. 39. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL1 – ACK – Syncpoint FailICON 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 14 XCF SEND ACK Understanding IMS OTMA Commit Mode and Synchronization Level 39
  40. 40. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL1 – ACK – Syncpoint FailICON CLIENT ICON OTMA MPR SVT XCF SEND TIB ACK PROCESS SYNC 15 SYNC FAIL 16 XCF SEND XCF SEND DFSxxx XCF SEND XCF SEND DISCARD DEALLOCATE REPLY ABORT 17 SEND FREE TIB DFSxxx APPL 18 ABEND TCP/IP WRITE 20 DISCARD DFSxxx 19 REPLY KEEP/FREE PROCESS SVT DFSxxx 21 22 Understanding IMS OTMA Commit Mode and Synchronization Level 40
  41. 41. IMS Regional User GroupClient 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 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 Understanding IMS OTMA Commit Mode and Synchronization Level 41
  42. 42. IMS Regional User GroupClient 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. 43. IMS Regional User GroupClient 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 10. IMS Connect anchors the reply message on the SVT Understanding IMS OTMA Commit Mode and Synchronization Level 43
  44. 44. IMS Regional User GroupClient 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. 45. IMS Regional User GroupClient 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 18. OTMA deletes the TIB control block Understanding IMS OTMA Commit Mode and Synchronization Level 45
  46. 46. IMS Regional User GroupClient Interface IMS Connect – CM1 SL1 – ACK – Syncpoint Fail 19. Syncpoint fails • The application abends 20. IMS Connect processes the failed syncpoint • IMS Connect discards the reply message • IMS Connect sends the DSFxxx message 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 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
  47. 47. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL1 – Client NAK ICON CLIENT ICON OTMA MPR TCP/IP WRITE IMS CONNECT CM1 SL1 Message WRITE XCF SEND ALLOC TIB Queue (ALLOC READ CM1 SL1 CALL RACF SVT) XCF SEND ISRT MSG 1 ENQ MSG GU IOPCB 2 3 4 SVT TIB ISRT IOPCB ANCHOR 5 MSG on TIB 6 START SYNC 7 GET MSG 8 XCF SEND REPLY XCF SEND ANCHOR REPLY 9 ON SVT 10 Understanding IMS OTMA Commit Mode and Synchronization Level 47
  48. 48. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL1 – Client NAK ICON CLIENT ICON OTMA MPR SVT TIB REPLY ON SVT SEND REPLY READ TCP/IP WRITE REPLY 11 SEND NAK READ 12 TCP/IP WRITE NAK DISCARD REPLY XCF SEND 13 14 XCF SEND NAK Understanding IMS OTMA Commit Mode and Synchronization Level 48
  49. 49. IMS Regional User GroupOTMA Client Interface – IMS Connect CM1 SL1 – Client NAK ICON CLIENT ICON OTMA MPR SVT XCF SEND TIB NAK PROCESS SYNC 15 SYNC FAIL 16 XCF SEND XCF SEND DFSxxx XCF SEND XCF SEND DISCARD DEALLOCATE REPLY ABORT 17 SEND FREE TIB DFSxxx APPL 18 ABEND TCP/IP WRITE 20 DFSxxx 19 KEEP/FREE PROCESS SVT DFSxxx 21 22 Understanding IMS OTMA Commit Mode and Synchronization Level 49
  50. 50. IMS Regional User GroupClient 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 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 Understanding IMS OTMA Commit Mode and Synchronization Level 50
  51. 51. IMS Regional User GroupClient 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. 52. IMS Regional User GroupClient 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 10. IMS Connect anchors the reply message on the SVT Understanding IMS OTMA Commit Mode and Synchronization Level 52
  53. 53. IMS Regional User GroupClient 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. 54. IMS Regional User GroupClient 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 18. OTMA deletes the TIB control block Understanding IMS OTMA Commit Mode and Synchronization Level 54
  55. 55. IMS Regional User GroupClient Interface IMS Connect – CM1 SL1 – Client NAK 19. Syncpoint fails • The application abends 20. IMS Connect processes the failed syncpoint • IMS Connect discards the reply message • IMS Connect sends the DSFxxx message 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 DSFxxx message Understanding IMS OTMA Commit Mode and Synchronization Level 55
  56. 56. IMS Regional User GroupOTMA Client Interface – WebSphere MQCM1 SL1 – ACK – Syncpoint OK MQ IMS MQ APPL MQ BRIDGE OTMA MPR Queue IMS MQPUT MQGET XCF SEND ALLOC TIB Message IMS XCF SEND CM1 SL1 CALL RACF Queue BRIDGE QUEUE 2 ISRT MSG ENQ MSG SEND ACK 1 XCF SEND ACK 3 GU IOPCB MQCMIT 5 DEQUEUE TIB INPUT ISRT IOPCB 4 ANCHOR MSG on TIB 6 7 START SYNC GET MSG 8 9 XCF SEND REPLY XCF SEND 10 Understanding IMS OTMA Commit Mode and Synchronization Level 56
  57. 57. IMS Regional User GroupOTMA Client Interface – WebSphere MQCM1 SL1 – ACK – Syncpoint OK MQ IMS MQ APPL BRIDGE OTMA MPR XCF TIB MQ SEND REPLY Queue MQPUT RTQ (OR DLQ) OK XCF SEND 11 ACK XCF SEND PROCESS SYNC 12 13 SYNC OK 14 XCF SEND XCF SEND DEALLOCATE CONFIRM 15 MQCMIT FREE TIB MQGET SYNC REPLYTO 18 16 COMPLETE QUEUE 17 19 Understanding IMS OTMA Commit Mode and Synchronization Level 57
  58. 58. IMS Regional User GroupClient 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. 59. IMS Regional User GroupClient 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. 60. IMS Regional User GroupClient 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 11. 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. 61. IMS Regional User GroupClient 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
  62. 62. IMS Regional User GroupOTMA Client Interface – WebSphere MQCM1 SL1 – ACK – Syncpoint Fail MQ IMS MQ APPL MQ BRIDGE OTMA MPR Queue IMS MQPUT MQGET XCF SEND ALLOC TIB Message IMS XCF SEND CM1 SL1 CALL RACF Queue BRIDGE QUEUE 2 ISRT MSG ENQ MSG SEND ACK 1 XCF SEND ACK 3 GU IOPCB MQCMIT 5 DEQUEUE TIB INPUT ISRT IOPCB 4 ANCHOR MSG on TIB 6 7 START SYNC GET MSG 8 9 XCF SEND REPLY XCF SEND 10 Understanding IMS OTMA Commit Mode and Synchronization Level 62
  63. 63. IMS Regional User GroupOTMA Client Interface – WebSphere MQCM1 SL1 – ACK – Syncpoint Fail MQ IMS MQ APPL BRIDGE OTMA MPR XCF TIB MQ SEND REPLY Queue MQPUT RTQ (OR DLQ) OK XCF SEND 11 ACK XCF SEND PROCESS SYNC 12 13 SYNC FAIL XCF SEND DFSxxx 14 XCF SEND XCF SEND MQBACK DEALLOCATE REPLY ABORT XCF SEND MQPUT 15 MQGET DFSxxx REPLYTO APPL QUEUE MQCMIT FREE TIB ABEND (DFSxxx) DFSxxx 16 17 19 18 Understanding IMS OTMA Commit Mode and Synchronization Level 63
  64. 64. IMS Regional User GroupClient 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. 65. IMS Regional User GroupClient 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. 66. IMS Regional User GroupClient 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 11. 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. 67. IMS Regional User GroupClient 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 16. OTMA deletes the TIB control block 17. Syncpoint fails • The application abends Understanding IMS OTMA Commit Mode and Synchronization Level 67
  68. 68. IMS Regional User GroupClient 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 19. The WebSphere MQ application MQGETs the DFSxxx message from the Reply-to Queue Understanding IMS OTMA Commit Mode and Synchronization Level 68
  69. 69. IMS Regional User GroupOTMA Client Interface – WebSphere MQ CM1SL1 – Client NAK MQ IMS MQ APPL MQ BRIDGE OTMA MPR Queue IMS MQPUT MQGET XCF SEND ALLOC TIB Message IMS XCF SEND CM1 SL1 CALL RACF Queue BRIDGE QUEUE 2 ISRT MSG ENQ MSG SEND ACK 1 XCF SEND ACK 3 GU IOPCB MQCMIT 5 DEQUEUE TIB INPUT ISRT IOPCB 4 ANCHOR MSG on TIB 6 7 START SYNC GET MSG 8 9 XCF SEND REPLY XCF SEND 10 Understanding IMS OTMA Commit Mode and Synchronization Level 69
  70. 70. IMS Regional User GroupOTMA Client Interface – WebSphere MQ CM1SL1 – Client NAK MQ IMS MQ APPL BRIDGE OTMA MPR XCF TIB MQ SEND REPLY Queue MQPUT RTQ AND DLQ FAIL XCF SEND 11 NAK XCF SEND PROCESS SYNC 12 13 SYNC FAIL XCF SEND DFSxxx 14 XCF SEND XCF SEND DEALLOCATE ABORT XCF SEND MQPUT 15 MQGET DFSxxx REPLYTO APPL QUEUE MQCMIT FREE TIB ABEND (DFSxxx) DFSxxx 16 17 19 18 Understanding IMS OTMA Commit Mode and Synchronization Level 70
  71. 71. IMS Regional User GroupClient 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. 72. IMS Regional User GroupClient 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. 73. IMS Regional User GroupClient 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 11. 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. 74. IMS Regional User GroupClient 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 16. OTMA deletes the TIB control block 17. Syncpoint fails • The application abends Understanding IMS OTMA Commit Mode and Synchronization Level 74
  75. 75. IMS Regional User GroupClient 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 19. The WebSphere MQ application MQGETs the DFSxxx message from the Reply-to Queue Understanding IMS OTMA Commit Mode and Synchronization Level 75
  76. 76. IMS Regional User GroupClient 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. 77. IMS Regional User GroupClient 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. 78. IMS Regional User GroupClient 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. 79. IMS Regional User GroupClient 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. 80. IMS Regional User GroupClient 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. 81. IMS Regional User GroupClient 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
  82. 82. IMS Regional User GroupOTMA Client Interface – IMS Connect CM0 SL1 – ACK ICON CLIENT ICON OTMA MPR TCP/IP WRITE IMS CONNECT CM0 SL1 ALLOC TIB Message WRITE XCF SEND CALL RACF Queue (ALLOC READ CM0 SL1 ISRT MSG SVT) XCF SEND ENQ MSG 1 FREE TIB GU IOPCB 2 3 4 SVT TIB ISRT IOPCB ENQ REPLY 5 ON TEMP Q 6 START SYNC PROCESS SYNC 7 8 ENQ REPLY ON QAB 9 SYNC OK END SYNC 10 11 Understanding IMS OTMA Commit Mode and Synchronization Level 82
  83. 83. IMS Regional User GroupOTMA Client Interface – IMS Connect CM0 SL1 – ACK ICON CLIENT ICON OTMA IMS Message MPR Queue SVT GET REPLY XCF SEND 12 REPLY XCF SEND ANCHOR REPLY 13 ON SVT TCP/IP WRITE 14 REPLY SEND REPLY READ 15 TCP/IP WRITE ACK SEND ACK READ XCF SEND ACK 16 XCF SEND PROCESS 18 DEQ REPLY REPLY 19 17 Understanding IMS OTMA Commit Mode and Synchronization Level 83
  84. 84. IMS Regional User GroupClient 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 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 • Frees the TIB after the message is enqueued Understanding IMS OTMA Commit Mode and Synchronization Level 84
  85. 85. IMS Regional User GroupClient 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. 86. IMS Regional User GroupClient 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 16. The IMS Connect Client gets the reply message and sends an ACK 17. The IMS Connect Client can process the message 18. IMS Connect sends the ACK to OTMA 19. OTMA de-queues the reply message Understanding IMS OTMA Commit Mode and Synchronization Level 86
  87. 87. IMS Regional User GroupOTMA Client Interface – IMS Connect CM0 SL1 – Client NAK ICON CLIENT ICON OTMA MPR TCP/IP WRITE IMS CONNECT CM0 SL1 ALLOC TIB Message WRITE XCF SEND CALL RACF Queue (ALLOC READ CM0 SL1 ISRT MSG SVT) XCF SEND ENQ MSG 1 FREE TIB GU IOPCB 2 3 4 SVT TIB ISRT IOPCB ENQ REPLY 5 ON TEMP Q 6 START SYNC PROCESS SYNC 7 8 ENQ REPLY ON QAB 9 SYNC OK END SYNC 10 11 Understanding IMS OTMA Commit Mode and Synchronization Level 87
  88. 88. IMS Regional User GroupOTMA Client Interface – IMS Connect CM0 SL1 – Client NAK ICON CLIENT ICON OTMA IMS Message MPR Queue SVT GET REPLY XCF SEND 12 REPLY XCF SEND ANCHOR REPLY 13 ON SVT TCP/IP WRITE 14 REPLY SEND REPLY READ 15 TCP/IP WRITE NAK SEND NAK READ XCF SEND NAK 16 RE-QUE/ XCF SEND PURGE/ REROUTE NOTIFY 18 REPLY USER 19 17 Understanding IMS OTMA Commit Mode and Synchronization Level 88
  89. 89. IMS Regional User GroupClient 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 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 • Frees the TIB after the message is enqueued Understanding IMS OTMA Commit Mode and Synchronization Level 89
  90. 90. IMS Regional User GroupClient 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. 91. IMS Regional User GroupClient 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 16. The IMS Connect Client gets the reply message and sends a NAK 17. The IMS Connect Client notifies the User 18. IMS Connect sends the NAK to OTMA 19. OTMA re-queues, or purges, or reroutes the reply message Understanding IMS OTMA Commit Mode and Synchronization Level 91
  92. 92. IMS Regional User GroupOTMA Client Interface – WebSphere MQCM0 SL1 – ACK MQ IMS MQ APPL MQ BRIDGE OTMA MPR Queue IMS MQPUT MQGET XCF SEND ALLOC TIB Message IMS XCF SEND CM0 SL1 CALL RACF Queue BRIDGE ISRT MSG QUEUE 2 ENQ MSG SEND ACK 1 FREE TIB XCF SEND ACK GU IOPCB 3 MQCMIT 5 DEQUEUE TIB INPUT ENQ REPLY ISRT IOPCB 4 ON TEMP Q 6 7 START PROCESS SYNC SYNC 8 9 ENQ REPLY ON QAB 10 SYNC OK END SYNC 11 12 Understanding IMS OTMA Commit Mode and Synchronization Level 92
  93. 93. IMS Regional User GroupOTMA Client Interface – WebSphere MQCM0 SL1 – ACK MQ IMS IMS MQ APPL BRIDGE OTMA Message MPR Queue GET REPLY 13 XCF SEND REPLY XCF SEND MQ 14 Queue MQPUT RTQ (OR DLQ) OK 15 MQCMIT 16 XCF SEND XCF SEND ACK 17 MQGET REPLYTO QUEUE DEQ REPLY 18 19 Understanding IMS OTMA Commit Mode and Synchronization Level 93
  94. 94. IMS Regional User GroupClient 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. 95. IMS Regional User GroupClient 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. 96. IMS Regional User GroupClient 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 16. The WebSphere MQ IMS Bridge MQCMITs the reply message 17. The WebSphere MQ IMS Bridge sends an ACK to OTMA for the reply message 18. OTMA de-queues 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 96
  97. 97. IMS Regional User GroupOTMA Client Interface – WebSphere MQCM0 SL1 – Client NAK MQ IMS MQ APPL MQ BRIDGE OTMA MPR Queue IMS MQPUT MQGET XCF SEND ALLOC TIB Message IMS XCF SEND CM0 SL1 CALL RACF Queue BRIDGE ISRT MSG QUEUE 2 ENQ MSG SEND ACK 1 FREE TIB XCF SEND ACK 3 GU IOPCB MQCMIT 5 DEQUEUE TIB INPUT ENQ REPLY ISRT IOPCB 4 ON TEMP Q 6 7 START PROCESS SYNC SYNC 8 9 ENQ REPLY ON QAB 10 SYNC OK END SYNC 11 12 Understanding IMS OTMA Commit Mode and Synchronization Level 97
  98. 98. IMS Regional User GroupOTMA Client Interface – WebSphere MQCM0 SL1 – Client NAK MQ IMS IMS MQ APPL BRIDGE OTMA Message MPR Queue GET REPLY 13 XCF SEND REPLY XCF SEND 14 MQ Queue MQPUT RTQ AND DLQ FAIL 15 XCF SEND XCF SEND NAK 16 RE-ENQ REPLY 17 Understanding IMS OTMA Commit Mode and Synchronization Level 98
  99. 99. IMS Regional User GroupClient 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. 100. IMS Regional User GroupClient 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. 101. IMS Regional User GroupClient 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. 102. IMS Regional User GroupClient 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
  103. 103. IMS Regional User GroupOTMA Client Interface – IMS Connect OTMA NAK Input Message ICON CLIENT ICON OTMA TCP/IP WRITE CONNECT INPUT WRITE (ALLOC XCF SEND READ SVT) INPUT PROCESS XCF SEND INPUT 1 FAILS 2 3 SVT NAK INPUT MESSAGE 4 XCF SEND NAK XCF SEND 5 SEND ERROR DELETE TIB (REQSTS) 6 TCP/IP WRITE 7 ERROR KEEP/FREE PROCESS SVT ERROR 8 9 Understanding IMS OTMA Commit Mode and Synchronization Level 103
  104. 104. IMS Regional User GroupClient 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. 105. IMS Regional User GroupClient 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 5. OTMA sends the NAK to IMS Connect via XCF 6. OTMA deletes the TIB control block if it was allocated 7. 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
  106. 106. IMS Regional User GroupOTMA Client Interface – WebSphere MQOTMA NAK Input Message MQ IMS MQ APPL MQ BRIDGE OTMA Queue MQPUT MQGET XCF SEND IMS XCF SEND INPUT BRIDGE PROCESS QUEUE 2 INPUT FAILS 1 3 NAK INPUT MESSAGE XCF SEND 4 NAK MQ XCF SEND PROCESS NAK 5 Input Queue 7 DELETE TIB Reply-to Queue Dead Letter Queue 6 Understanding IMS OTMA Commit Mode and Synchronization Level 106
  107. 107. IMS Regional User GroupClient 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

×