© 2013 IBM Corporation®IMSCalling out from IMS applications:methods and best practicesBen JohnsonJack YuanApril 18, 2013Wi...
IMS2Customers running IMS have a variety of computer hardware and networkconfigurations installed, typically employing IMS...
© 2013 IBM Corporation®IMSOverview of 7 IMS callout methods
IMS4IMSA-PGMAGU IOPCBISRT ALTPCBIMSA/IMSB(MSC)PGM-BIMS-Managed ALTPCB CalloutGU IOPCBISRT IOPCBCLIENTUOW1UOW2
IMS5IMSA-PGMAGU IOPCBISRT ALTPCBCPI-C TP-ACMRCVCMSENDCMDEALAPPC/IMSCMALLC Allocate TP-AType=NONE/CONFIRMCMSEND SEND_DATACM...
IMS6IMSA-PGMAGU IOPCBMQCONN MQ-BMQPUT NO-SYNCPOINTMQGET NO-SYNCPOINTMQDISCMBMQGETMQPUTMQDISCQueuemessagesSynchronous Callo...
IMS7ServiceIMSA-PGMAGU IOPCBEXEC SQL:CALL PROC ( :aaa : bbb … DB2 stored procedureUser-defined function(UDF)dataDB2 Stored...
IMS8READ_DATAWRITE_DATACLOSESocketConnect - TCP/IP-BWRITE_DATAREAD_DATACLOSETCP/IP-BREAD_DATASocketConnect -TCP/IP-CConnec...
IMS9IMS-ApplGU IOPCBISRT ALTPCBOTMADescriptorTMEMBERTPIPE IMS ConnectSocketMessageAsynchronous callout via OTMATCP/IP-BRes...
IMS10IMS-ApplGU IOPCBICAL OTMADescriptorTMEMBERTPIPEIMS ConnectSocketMessageSynchronous callout using DL/I ICALTCP/IP-BRes...
IMS11Summary of IMS callout methodsICALISRTALTCBOTMAESAF/DB2ESAF/MQSeriesTCP/IPSocketsUsingAPPCIMSprogramswitchData-PowerI...
© 2013 IBM Corporation®IMSSynchronous callout using DL/I ICALDeep-dive
IMS13DL/I ICAL call provides the capability to callout to resources outsideIMS synchronouslyIMS SOAP GATEWAYz/OSIMSDatabas...
IMS14Overview - IMS Synchronous Callout using DL/I ICALIt is a SYNCHRONOUS call in your IMS application.– Need to change y...
IMS15Overview - IMS Synchronous Callout using DL/I ICAL…Supports messages larger than 32K without segmentation– No need to...
IMS16Steps to have a synchronous callout application using ICALSTEP 1:STEP 2:STEP 3:STEP 4:Determine the external applicat...
IMS17Determine the external applicationDatabase ManagementA light-weight Web Servicesolution for IMS without theneed of a ...
IMS18Setting up OTMA destination descriptor in IMS PROCLIBD destname keywordsWhere:destname is destination names and can b...
IMS19IMS type-2 commands for OTMA destination routingdescriptorsType-2 commands can also be used to update, create, delete...
IMS20Prepare your IMS application for the DL/I ICAL>>-ICAL--aib---request_area---response_area-----------------><The forma...
IMS21COBOL Application with ICALDescriptornameTimeoutRequest Area LengthResponse Area LengthOutput returncodesICALAIBIOAreas
IMS22BMP with DDLT0 tool25-32 a destination name in OTMA destinationdescriptor name, 8–byte character field (ICAL). Ourexa...
IMS23
IMS24WebSphere and IMS TM Resource AdapterWAS/WPS/WTX/WMB/WESBIMS TMIMS TMresourceresourceadapteradapterWebServiceTCP/IPWe...
IMS25
IMS26Synchronous Callout FlowIMSIMS App1z/OSz/OS, zLinux, Win, AIX etc..DL/I ICALDescriptor nameTimeoutIMS Enterprise Suit...
IMS27
IMS2828IMS Synchronous Callout Overview for RYO clientRYO ApplicationACKResponse134IMS Connectz/OSIMSIMS Application2Initi...
IMS29Callout with RYO - Programming1. Issue Resume TPIPE request– CM0, Synclevel Confirm, RT Auto/Single, timeout– Resume ...
IMS30
IMS31IMS Connect APIIMSConnectAPIClientApplication IMSConnectAPIClientApplicationIMSConnectAPIClientApplicationIMSConnectW...
IMS32IMS Connect APIProvides simplified API to build roll-your-own IMS Connect clientapplication to invoke IMS transaction...
IMS33
IMS34Inbound / Outbound DataPower flow for IMS CalloutResponseDataPower XI52, XI50B, XB62Multi-Protocol GatewayTransformat...
© 2013 IBM Corporation®IMSCalling out from IMS applications:Best PracticesWith THANKS toDave Cameron
IMS36Choose the asynchronous callout method to avoid tying up IMSregions while the callout request is processedSync Callou...
IMS37Choose a synchronous callout method that is scalable and providesgood performance for your installationUsing APPC/CPI...
IMS38Best practices for using ICAL DL/I call from IMS applicationsDesign synchronous callout applications to minimize reso...
IMS39Best practices for using ICAL DL/I call from IMS applications…Define an appropriate number of IMS dependent regions– ...
IMS40Best practices for using ICAL DL/I call from IMS applications…Manage high volume and multiple destinations with OTMA ...
© 2013 IBM Corporation®IMSThings to Know
IMS42Summary of callout highlights1. Calling out from IMS applications can integrate IMS data andapplications with many mo...
Upcoming SlideShare
Loading in …5
×

IMS callout best practices - IMS UG April 2013 San Ramon

582 views

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
582
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
18
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

IMS callout best practices - IMS UG April 2013 San Ramon

  1. 1. © 2013 IBM Corporation®IMSCalling out from IMS applications:methods and best practicesBen JohnsonJack YuanApril 18, 2013With THANKS toDave CameronKen BlackmanHimakar Chennapragada
  2. 2. IMS2Customers running IMS have a variety of computer hardware and networkconfigurations installed, typically employing IMS as a repository for information.Some customers also use IMS as one of their application platforms in Enterpriseresource planning (ERP) systems that integrate internal and external managementinformation.Why call out?
  3. 3. © 2013 IBM Corporation®IMSOverview of 7 IMS callout methods
  4. 4. IMS4IMSA-PGMAGU IOPCBISRT ALTPCBIMSA/IMSB(MSC)PGM-BIMS-Managed ALTPCB CalloutGU IOPCBISRT IOPCBCLIENTUOW1UOW2
  5. 5. IMS5IMSA-PGMAGU IOPCBISRT ALTPCBCPI-C TP-ACMRCVCMSENDCMDEALAPPC/IMSCMALLC Allocate TP-AType=NONE/CONFIRMCMSEND SEND_DATACMDEAL DeAllocateConversationACLIENTISRT IOPCBUOW1IMS LU6.2DescriptorUOW2CPI-C/APPC SynchronousCMALLC Allocate TP-BType=NONE/CONFIRM/SYNCPTCMSEND SEND_DATACMRCV RECEIVE_and_WAITCMDEAL DeAllocateConversationBUOW1CPI-C TP-BCMRCVCMSENDCMDEALCallout using APPCAPPC Asynchronous
  6. 6. IMS6IMSA-PGMAGU IOPCBMQCONN MQ-BMQPUT NO-SYNCPOINTMQGET NO-SYNCPOINTMQDISCMBMQGETMQPUTMQDISCQueuemessagesSynchronous Callout with WebSphere MQ APICLIENTISRT IOPCBIMSManagedUOW1
  7. 7. IMS7ServiceIMSA-PGMAGU IOPCBEXEC SQL:CALL PROC ( :aaa : bbb … DB2 stored procedureUser-defined function(UDF)dataDB2 Stored Procedure via ESAFSynchronousCLIENTISRT IOPCBIMSManagedUOW1
  8. 8. IMS8READ_DATAWRITE_DATACLOSESocketConnect - TCP/IP-BWRITE_DATAREAD_DATACLOSETCP/IP-BREAD_DATASocketConnect -TCP/IP-CConnectiondatagramsUser-Written TCP/IP Synchronous calloutCLIENTIMSA-PGMAGU IOPCBISRT IOPCBUOW1UOW2
  9. 9. IMS9IMS-ApplGU IOPCBISRT ALTPCBOTMADescriptorTMEMBERTPIPE IMS ConnectSocketMessageAsynchronous callout via OTMATCP/IP-BResume_TPIPEREAD_DATAACKCLIENTISRT IOPCBUOW1UOW2
  10. 10. IMS10IMS-ApplGU IOPCBICAL OTMADescriptorTMEMBERTPIPEIMS ConnectSocketMessageSynchronous callout using DL/I ICALTCP/IP-BResume_TPIPEREAD_DATA(COR_ID)ACKSEND_DATA(COR_ID)CLIENTISRT IOPCBUOW1UOW2SEND_DATARECEIVE_DATA
  11. 11. IMS11Summary of IMS callout methodsICALISRTALTCBOTMAESAF/DB2ESAF/MQSeriesTCP/IPSocketsUsingAPPCIMSprogramswitchData-PowerIMSSOAPGatewayTCP/IPApp.WebSp.TMRAMQ.App.DB2App.APPC/CPI-CAppIMSApp.Coordi-natedCommit/backoutSync.Comm.Async.Comm.* * *** * *: indirect callmethodsAttribute&EndPoint
  12. 12. © 2013 IBM Corporation®IMSSynchronous callout using DL/I ICALDeep-dive
  13. 13. IMS13DL/I ICAL call provides the capability to callout to resources outsideIMS synchronouslyIMS SOAP GATEWAYz/OSIMSDatabaseDBServicesOTMATM/CTLServicesIMSConnectTCP/IPuser-written ClientWebSphereIMS TM resource adapterApplicationProgramICALMPP/JMP/IFP/BMP/JBPOTMADescriptorOTMADescriptor
  14. 14. IMS14Overview - IMS Synchronous Callout using DL/I ICALIt is a SYNCHRONOUS call in your IMS application.– Need to change your existing IMS application or create a newIMS applicationDoes not go through IMS Message Queue, and thesynchronous callout message/response are not recovered.Does not support 2 phase commit support using RRSCallout message needs to go through IMS Connect– It does not go through MQSeries support
  15. 15. IMS15Overview - IMS Synchronous Callout using DL/I ICAL…Supports messages larger than 32K without segmentation– No need to build data in LLZZ formatTimeout support to optionally terminate callout request and free thedependent regionIMS commands enhanced to view synchronous callout status andstop the callout processingLimited security credentials propagated by IMS to external serverIf a shared queues back-end IMS does not have an IMS Connectconnection, the back-end IMS cannot process DL/I ICAL for calloutIMS listener in WAS or distributed application.– Based on OTMA Resume TPIPE/Send Only protocol function forretrieving synchronous callout requests and sending responses. So weLeverage asynchronous flow, although appears synchronous to IMSapplication
  16. 16. IMS16Steps to have a synchronous callout application using ICALSTEP 1:STEP 2:STEP 3:STEP 4:Determine the external application (WebSphere TMRA,TCP/IP roll-your-own application, TCP/IP application using IMSConnect API, or IMS Soap Gateway application)Setup IMS (OTMA destination descriptor)Setup IMS application (COBOL, PL/I, REXX, C, JAVA…..)Setup the external application or server for callout messages
  17. 17. IMS17Determine the external applicationDatabase ManagementA light-weight Web Servicesolution for IMS without theneed of a Java EE serverJava EE apps (MDB or EJB)running in WebSphereApplication Server (WAS)using IMS TM ResourceAdapter (IMS TM RA)Transaction ManagementWebSphere MDB/EJB appl.TCP/IP application connectsto IMS ConnectNeed to understand IMSConnect and OTMA protocolsSOAP Gateway Appl.SystemRoll-your-own Appl.Supports the highperformance IMS Calloutsolution, and DataPower’shardware acceleration forXML processing.Roll-your-own w/ DataPowerA simplified callable interfacefor interaction with IMSConnectAddresses the complexities ofwriting RYO applicationsRoll-your-own w/ ICON API
  18. 18. IMS18Setting up OTMA destination descriptor in IMS PROCLIBD destname keywordsWhere:destname is destination names and can be masked by ending in an *keywords are: TYPE=IMSCONTMEMBER=nameTPIPE-nameSMEM=YES|NOADAPTER=adapnameCONVERTR=convnameSYNTIMER=timeout (If both ICAL & Descriptor specify timeout, the lower value is used)D OTMDEST1 TYPE=IMSCON TMEMBER=HWS1 TPIPE=TPIPE1 SYNTIMER=500The OTMA Destination Routing Descriptors were introduced in IMS 10. Theyexternalize the routing definitions and specifications for callout messageswithout IMS user exits. Descriptors are read and initialized at IMS startup.– Use ‘D’ descriptor type in DFSYDTx member of IMS.PROCLIB.For example:D SOAPGW1 TYPE=IMSCON TMEMBER=HWS1 TPIPE=HWS2SOAPD SOAPGW1 ADAPTER=XMLADPTR CONVERTR=XMLCNVTR SYNTIMER=200D SANDY01 TYPE=IMSCON TMEMBER=HWS2 TPIPE=TPIPE2
  19. 19. IMS19IMS type-2 commands for OTMA destination routingdescriptorsType-2 commands can also be used to update, create, delete, or querythe descriptor entries– CREATE OTMADESC– UPDATE OTMADESC– QUERY OTMADESC– DELETE OTMADESCFor example: UPDATE OTMADESC NAME(OTMDEST1) SET(SYNTIMER(800))QRY OTMADESC NAME(OTMDEST1) SHOW(ALL)
  20. 20. IMS20Prepare your IMS application for the DL/I ICAL>>-ICAL--aib---request_area---response_area-----------------><The format of the ICAL call for a synchronous callout request:
  21. 21. IMS21COBOL Application with ICALDescriptornameTimeoutRequest Area LengthResponse Area LengthOutput returncodesICALAIBIOAreas
  22. 22. IMS22BMP with DDLT0 tool25-32 a destination name in OTMA destinationdescriptor name, 8–byte character field (ICAL). Ourexample is JOHNSON134-39 The wait time for the synchronous call to beprocessed, 6–byte character field with a range from 1 to999999 (ICAL), our example is 8 seconds41-45 The input message length nnnnn The length ofthe input data in the request area (ICAL). Our exampleis 50 bytes47-51 The response area length nnnnn The length ofthe response area for the output message (ICAL). Ourexample is 1000 bytes//JACK EXECDDLT0,PSBNAME=PSAPP99,TYPE=BMP,IMSID=TEST,// QUAL=IMSTSYS,NBA=50//SYSIN DD *S1111 1 1 1 1IOPCB AIBL ICAL SENDRECV JOHNSON1 000800 0005001000L DATA CREDIT CARD NUMBER FOR JACKE OK--------------------------------------------------------------------------------SEGMENT =(CREDIT CARD NUMBER FOR JACK )................................................................................CALL=ICALSEGMENT =(111222333444 )COMP RET CODE=OKIOPCB LTERM= RET CODE= RACFUSER=PSAPP99 .0003 0003 0000AIB BLOCK AIBOALEN = 0002, AIBOAUSE = 0006, RETURN CODE = 0000, REASON
  23. 23. IMS23
  24. 24. IMS24WebSphere and IMS TM Resource AdapterWAS/WPS/WTX/WMB/WESBIMS TMIMS TMresourceresourceadapteradapterWebServiceTCP/IPWebComponentEnterpriseBeanIMSConnectIMS DB *IMSIMS AppEnable an IMS transaction as Web Service with full SOA support– Integrate with a variety of Java EE or WebSphere-based servers with built-in QoSsupport (2PC, connection pooling, security management)– Java EE Connector Architecture (JCA/J2C) compliant– Recommended when Java EE server (e.g. WAS) is already in-use– Supports rapid application development with Rational toolingRational ApplicationDeveloper (RAD) orWebSphere IntegrationDeveloper (WID)IMS appSource(COBOL, PLI,C, MFS)Generates* Binary, text or XML data
  25. 25. IMS25
  26. 26. IMS26Synchronous Callout FlowIMSIMS App1z/OSz/OS, zLinux, Win, AIX etc..DL/I ICALDescriptor nameTimeoutIMS Enterprise SuiteSOAP Gateway ServerIMSConnectReceive Callout Request in XMLSend Callout Response in XMLWebServiceAXMLAdapterMsg1Msg2TPIPESend ACKXMLConverter123567Development & Runtime Environment4ExecutionExecutionGenerationGenerationRD/z Meet-In-The-MiddleWizardExisting WSDLCorrelatorFileRD/zGenerateTaskExisting COBOLCopybookDevelopmentenvironmentError Handling: If Web Services returns a Web Service Fault error, SOAP Gateway sends an error response with the Fault message to the DLI call
  27. 27. IMS27
  28. 28. IMS2828IMS Synchronous Callout Overview for RYO clientRYO ApplicationACKResponse134IMS Connectz/OSIMSIMS Application2Initiating ClientResume TPIPETPIPE1ICAL SENDRECV OTMDEST1HELLO FROM IMSHELLO FROM IMSRequestTPIPETPIPE1HELLO FROM RYOHELLO FROM RYOOTMDEST1TPIPE1HWS1HWS1OTMA Descriptor
  29. 29. IMS29Callout with RYO - Programming1. Issue Resume TPIPE request– CM0, Synclevel Confirm, RT Auto/Single, timeout– Resume TPIPE on client ID or alternate client ID2. Receive the callout request and correlation token3. Send an ACK to acknowledge the callout request– Alternately, you may send a NAK to stop the callout request4. Send an response back to IMS with correlation token– Commit Mode 0, Send-Only– Alternately, an error response maybe sent in case of error situation
  30. 30. IMS30
  31. 31. IMS31IMS Connect APIIMSConnectAPIClientApplication IMSConnectAPIClientApplicationIMSConnectAPIClientApplicationIMSConnectWindows or z/OSOTMAIMS AppIMS AppIMS Appz/OSConnectionAndTMInteractionpropertyfilesload
  32. 32. IMS32IMS Connect APIProvides simplified API to build roll-your-own IMS Connect clientapplication to invoke IMS transactions from Java and C environmentsShields users from IMS Connect protocol (IRM, CSM, RSM, etc.) andlow-level socket communicationsRecommend to use in RYO client application that does not run in anapplication serverValue– Extends the value of IMS resources by allowing easy access from new Javaor C-based applications– Simplifies migration of existing applications from SNA to TCP/IP– Simplifies development of new applications to access IMS transactions
  33. 33. IMS33
  34. 34. IMS34Inbound / Outbound DataPower flow for IMS CalloutResponseDataPower XI52, XI50B, XB62Multi-Protocol GatewayTransformationIMSCalloutFrontSideHandlerTransformationRequestOutbound RuleInbound RuleIMS V12IMSapplication..ICAL(synchronous)IMSConnectTPIPEServicesServicesWSProxy
  35. 35. © 2013 IBM Corporation®IMSCalling out from IMS applications:Best PracticesWith THANKS toDave Cameron
  36. 36. IMS36Choose the asynchronous callout method to avoid tying up IMSregions while the callout request is processedSync CalloutResponseCallout RequestAsync CalloutResponseIMS Application 1IMS Application 2Async: ISRT ALTPCBSync: ICAL
  37. 37. IMS37Choose a synchronous callout method that is scalable and providesgood performance for your installationUsing APPC/CPI-CUsing TCP/IP socket callsUsing ESAF/MQSeriesUsing ESAF/DB2Using ICAL DL/I call (This is the newest solution offered by IMS)
  38. 38. IMS38Best practices for using ICAL DL/I call from IMS applicationsDesign synchronous callout applications to minimize resourcecontention– After an IMS application issues an ICAL call for a synchronous callout, itwaits in the IMS dependent region until either the response is received fromthe external application or the timeout interval expires. While waiting, all ofthe resources that the application program has accumulated during thecurrent unit of work are held.– To avoid excessive resource contention, have the application program issuethe ICAL DL/I call as early as possible, before too many resources areobtained.
  39. 39. IMS39Best practices for using ICAL DL/I call from IMS applications…Define an appropriate number of IMS dependent regions– When many IMS applications use synchronous callout, especially with slowexternal service providers, it may become necessary to increase the numberof IMS dependent regions. This comes with the concerns of more resourcesand greater chances for resource contention.Define appropriate timeout values on the ICAL call– The synchronous callout request also allows for setting a timeout value so ifthe callout response is delayed the IMS application will receive return andreason codes indicating the timeout and the application can decide whetherto proceed without the callout information or to retry the callout request. Thetimeout value must be balanced between allowing sufficient time for thecallout request to be processed and protecting the IMS dependent regionfrom being held up.
  40. 40. IMS40Best practices for using ICAL DL/I call from IMS applications…Manage high volume and multiple destinations with OTMA destinationdescriptors– If high volumes of callout requests are anticipated then the service providershould make retrieval requests to different destinations and separatedescriptors can be used to route callout requests to these separatedestinations. This can improve throughput, but might add complexity to theIMS applications.
  41. 41. © 2013 IBM Corporation®IMSThings to Know
  42. 42. IMS42Summary of callout highlights1. Calling out from IMS applications can integrate IMS data andapplications with many modern enterprise architectures, suchas ERP systems, service oriented architectures (SOA), andso forth.2. When choosing a synchronous or asynchronous calloutmethod, consider your needs for scalability and performance.3. The ICAL DL/I call has been available for synchronouscallout since IMS Version 10.4. All messages that use the ICAL callout method go throughIMS Connect.5. IMS Version 13 expands the ICAL DL/I call to supportsynchronous program switch function to “call out” to otherIMS application program.

×