>My company is currently running IBM Enterprise COBOL for z/OS V3.4. >We are also running SAP. I would like to create a web service in >SAP, then call it from a COBOL Program. >How do I call a Web Service from a COBOL Program? >Let me know if you need any more information. Any help is greatly >appreciated!!
There are a lot of ways to do this, but, to answer your question directly, Enterprise COBOL has XML PARSE and XML GENERATE statements. These statements are the root of how and why Enterprise COBOL can handle SOAP (Web services) XML formats. If you study the documentation for these statements carefully you can write code to get the job done. However, I would strongly recommend you use something like Enterprise Service Tools (EST), a part of WebSphere Developer for System z. XML is inherently difficult to work with and map to/from COBOL formats without a graphical tool. If you have CICS Transaction Server V3, IBM provides one no-charge full function license to WebSphere Developer for System z when you order the no-charge Service Flow Feature element. (You also get 10 more licenses to use only for specific CICS-related purposes, including building CICS Web services.) The EST features are not restricted to working with CICS. You can build Web services with COBOL batch programs, IMS, z/OS UNIX System Services, etc. But the development process is fundamentally similar. There is a SHARE presentation which includes some sample COBOL code here: http://www.ibm.com/support/docview.wss?uid=swg27004198 Note that the "XSE" mentioned in this presentation is now called EST. There's a somewhat dated IBM Redbook with information on XML and COBOL here: http://www.redbooks.ibm.com/abstracts/sg246826.html Section 5.3, specifically, has some sample source code. These documents describe how to parse and generate XML (generically). You'll also have a need for a network transport of some kind. WebSphere MQ (SOAP over MQ) is quite straightforward and reliable and easy to program (GETs and PUTs), and you're probably already familiar with that. I suspect you'll want to use that to/from SAP. Alternatively, CICS has HTTP/HTTPS support (if you have CICS), and there's also the IBM HTTP Server, a no-charge feature of z/OS. The IBM HTTP Server can trigger the execution of COBOL programs via CGI, for example. Now, all that said, you might want to sit down with an IBM z Architect to review all the options available and see which makes the most sense for your situation. Also, when you do describe your new COBOL Web services, I think it's a very good idea to generate WSDL files *and* to publish those to a service directory at least within your organization, so other developers can take advantage of those services. - - - - - Timothy Sipples IBM Consulting Enterprise Software Architect Specializing in Software Architectures Related to System z Based in Tokyo, Serving IBM Japan and IBM Asia-Pacific E-Mail: [EMAIL PROTECTED] ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

