rexx spoc api for ibm ims

Click here to load reader

Post on 27-May-2015

1.598 views

Category:

Technology

14 download

Embed Size (px)

TRANSCRIPT

  • 1. Stan Sun IMS Developer 11/2009 [email protected] IMS REXX SPOC API .everything you always wanted to know 2009 IBM Corporation

2. ReThink IMS! Trademarks IBM, IBM eServer, IBM logo, e-business logo, CICS, DB2, MQ, ESCON, Enterprise Storage Server, GDPS, IMS, MVS, OS/390, Parallel Sysplex, Redbook, Resource Link, S/390, System z9.iSeries, pSeries, System p,xSeries, System x, OS/400, i5OS, System Storage, TotalStorage, VM/ESA, VSE/ESA, WebSphere, z/OS, z/VM, z/VSE, and zSeries are trademarks or registered trademarks of International Business Machines Corp. in the United States, other countries, or both.Linux is a registered trademark of Linux Torvalds in the UnitedStates, other countries, or both.Microsoft is a registered trademark of Microsoft Corporation in theUnited States, other countries, or both.UNIX is a registered trademark of The Open Group in the UnitedStates, other countries, or both. 2 2009 IBM Corporation 3. ReThink IMS!DisclaimersCopyright 2009 by International Business Machines Corporation. No part of this document may be reproduced or transmitted in any form without written permission from IBM Corporationor except as expressly provided in a contract between you and IBM. Product data has been reviewed for accuracy as of the date of initial publication. Product data is subject to change withoutnotice. This information could include technical inaccuracies or typographical errors. IBM may make improvements and/orchanges in the product(s) and/or programs(s) at any time without notice. Any statements regarding IBM's future direction and intent are subject to change or withdrawal without notice, andrepresent goals and objectives only. References in this document to IBM products, programs, or services does not imply that IBM intends to make suchproducts, programs or services available in all countries in which IBM operates or does business. Any reference to an IBMProgram Product in this document is not intended to state or imply that only that program product may be used. Anyfunctionally equivalent program, that does not infringe IBMs intellectually property rights, may be used instead. It is theusers responsibility to evaluate and verify the operation of any on-IBM product, program or service. THE INFORMATION PROVIDED IN THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHEREXPRESS OR IMPLIED. IBM EXPRESSLY DISCLAIMS ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR APARTICULAR PURPOSE OR NONINFRINGEMENT. IBM shall have no responsibility to update this information. IBMproducts are warranted according to the terms and conditions of the agreements (e.g., IBM Customer Agreement,Statement of Limited Warranty, International Program License Agreement, etc.) under which they are provided. IBM is notresponsible for the performance or interoperability of any non-IBM products discussed herein. The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBMpatents or copyrights. Inquiries regarding patent or copyright licenses should be made, in writing, to: IBM Director of LicensingIBM CorporationNorth Castle DriveArmonk, NY 10504-1785U.S.A. 3 2009 IBM Corporation 4. ReThink IMS! AgendaOverview of the REXX SPOC APIHow the REXX SPOC API fits into an IMSplex environmentUsing the REXX SPOC APISet up the REXX and IMSplex environmentREXX SPOC API subcommandsHello World demoRetrieving unsolicited messagesHow to invoke a REXX SPOC program with a batch JCLAutonomic computing example and demo4 2009 IBM Corporation 5. ReThink IMS! What is the REXX SPOC?The REXX SPOC is actually an API that allows REXX programs to: Submit type-1 or type-2 IMS commands to one or more IMS systems in an IMSplex Retrieve command responses Subscribe to the Operations Manager (OM) for unsolicited system messages, which can include responses to commands issued from any SPOC in an IMSplex that are routed back through OM. Source: If applicable, describe source origin5 2009 IBM Corporation 6. ReThink IMS! IMSplex Operations z/OSa z/OSbOperations S IMS Control Manager C Region(OM) I SCIz/OSx Single Point of Control(SPOC) S CAutomation - SPOCIIMS Control S S IMS Control RegionC C region REXXI I SPOCAPI Source: If applicable, describe source origin6 2009 IBM Corporation 7. ReThink IMS! Advantages over other IMS automation tools like AOI and TCOThe REXX SPOC API has several advantages:It can issue IMS type-1 or type-2 commands in an IMSplex. In addition,REXX programs can also issue other commands, such as z/OS operatorcommands or TSO commands, to manage the system.It can examine command responses, unlike TCO, and take further actionbased on those responses. Those responses are in the form of XMLstatements and are easier to parse than the command responses that arereturned to the AOI interface.It is independent of IMS, and therefore easier to implement and run.It can run in Tivoli NetView for z/OSIt can issue /NRE and /ERE commands, unlike TCO. Source: If applicable, describe source origin7 2009 IBM Corporation 8. ReThink IMS! Using the REXX SPOC API environment with the CSL OMYou can use the REXX SPOC API with the CSL OM to: Set up the REXX environment Set up the IMSplex environment and issue commands Retrieve the command responsesEach of these phases will be described in detail in the following charts. Source: If applicable, describe source origin8 2009 IBM Corporation 9. ReThink IMS! Setting up the REXX environment in a CSLTo set up the REXX environment, use the ADDRESS command to call the program CSLULXSB. This program establishes the REXX subcommand environment for the REXX SPOC API.>>--- ADDRESS --- LINK --- CSLULXSB -------------------------------- >< Source: If applicable, describe source origin9 2009 IBM Corporation 10. ReThink IMS! Setting up the IMSplex environment After setting up the REXX environment using the CSLULXSB program,you can set up the IMSplex environment. To set up the IMSplex environment and begin to issue commands, switchthe default host command to IMSSPOC using the ADDRESS command. >>--- ADDRESS --- IMSSPOC --------------------------------------------------- >< Source: If applicable, describe source origin10 2009 IBM Corporation 11. ReThink IMS! Subcommands in REXX SPOC APIRequired subcommands IMS CART END Optional subcommands ROUTE WAIT Detailed description of above subcommands will be illustrated in latercharts. Source: If applicable, describe source origin11 2009 IBM Corporation 12. ReThink IMS! Issuing IMS commands You can issue IMS commands, including type-2 commands, by includingthem in the REXX program stream as quoted strings or as REXXvariables that resolve to quoted strings. Example QUERY IMSPLEX SHOW(ALL) DIS DB F13A0 namelist = name1,name2QUERY TRAN NAME( namelist ) Source: If applicable, describe source origin12 2009 IBM Corporation 13. ReThink IMS! Build a Hello World program Try to build a Hello World program now before knowing all the details. We talked about the REXX and IMSplex setup commands. We talked about some REXX SPOC API subcommands. We talked about issuing IMS commands as quoted strings. Source: If applicable, describe source origin13 2009 IBM Corporation 14. ReThink IMS! Hello World program (simplified) Source: If applicable, describe source origin14 2009 IBM Corporation 15. ReThink IMS! Run the programBefore you can run the Hello World program, youll need to first completethese set up steps: Allocate the program to SYSPROC Allocate the LOADLIB to the TSO user ID An example is shown on the next chart. Source: If applicable, describe source origin15 2009 IBM Corporation 16. ReThink IMS! Hello World Demo (simplified) Source: If applicable, describe source origin16 2009 IBM Corporation 17. ReThink IMS! IMS subcommand - requiredThe IMS subcommand establishes the name of the IMSplex. The IMSplex name must be established before any other commands canbe issued. Note: A prefix of CSL is automatically added to the name that youspecify. >>--- IMS --- IMSplex_name ---------------------------------------------------- >< Source: If applicable, describe source origin17 2009 IBM Corporation 18. ReThink IMS! CART subcommand - required Use the Command and Response Token (CART) subcommand to set thename of the command and response token. The 16-character text string token is used to retrieve the commandresponse. The CART subcommand is required before you can successfully issueany IMS commands>>--- CART --- token_name --------------------------------------------------- >< Source: If applicable, describe source origin18 2009 IBM Corporation 19. ReThink IMS! ROUTE subcommand - optionalUse the ROUTE subcommand to set the name of the command processors.If you do not specify a command processor: Commands are routed to all members of the IMSplex. This is the default. The previous routing value is removed Specifying * causes the command to be routed to all registered commandprocessing clients in the IMSplex. Specifying % causes the command to be routed to only one commandprocessing client in the IMSplex that is registered for the command and that hasMASTER capability. The OM chooses the command processing client.---- , ----------------------------->>--- ROUTE ------------------------------------------------------------------------- >< --- command_processor --- --- * --------------------------- --- % --------------------------Source: If applicable, describe source origin19 2009 IBM Corporation 20. ReThink IMS! WAIT subcommand - optionalUse the WAIT subcommand to provide a timeout value to OM. This WAIT value is the maximum time you want to wait for OM tocomplete your command. The time value must be in the form MMM:SS or ssss. The maximumvalue you can specify is 999:59.>>--- WAIT --- time_value --------------------------------------------------- >< Source: If applicable, describ