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?
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
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
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
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
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
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
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)
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:
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). 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
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
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
IMS2828IMS Synchronous Callout Overview for RYO clientRYO ApplicationACKResponse134IMS Connectz/OSIMSIMS Application2Initiating ClientResume TPIPETPIPE1ICAL SENDRECV OTMDEST1HELLO FROM IMSHELLO FROM IMSRequestTPIPETPIPE1HELLO FROM RYOHELLO FROM RYOOTMDEST1TPIPE1HWS1HWS1OTMA Descriptor
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
IMS31IMS Connect APIIMSConnectAPIClientApplication IMSConnectAPIClientApplicationIMSConnectAPIClientApplicationIMSConnectWindows or z/OSOTMAIMS AppIMS AppIMS Appz/OSConnectionAndTMInteractionpropertyfilesload
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
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
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)
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.
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.
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.
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.