Using iPhone to access COBOL/CICS/VSAM, COBOL/IMS and RPG?
RegiBarosa 100000328E Comments (2) Visits (7532)
I am sure that there is many ways to accomplish this task...
But I want to show one that I have done using Web Services and Rich UI.
Do you have an iPhone or iPod touch?
(the options 1, 2,3 and 5 were done with EGL Rich UI; the #4 was done by COBOL/CICS only and not discussed in this blog.)
Application Server on System z)
I have done all that above (the client and the server piece) in less than 12 hours and I am an old generation guy. I started doing COBOL development punching IBM 029 cards.. Since then I had learned lots of new stuff, but as you all know this is a never ending.... and this is the beauty of EGL: simplifies that learning curve.
I am familiar with the EGL language and Rational Developer for z with EGL (RDz) as well some skill on Rational Developer for system i for SOA Construction(RDi SOA). Using those tools I created these simple demos, reusing existing COBOL/CICS/VSAM, COBOL/IMS and RPG code.
What really impressed me in this small demo is the response time to invoke either CICS, IMS or RPG Services... Try it..
Another surprise.. when the parsing is done by COBOL (CICS demo) I got the same or even better response time compared to parsing done by Java (IMS and RPG demos).
Using the Service Monitor (available here in the EGL Café) when you click in the green icon:
The response time to invoke the web services will vary from 0.15 to 2 seconds.. Really impressive. This is like green screens response time.. and remember that we have SOAP XML parsing, etc..
You also can see this in action using the YouTube links below:
I have created those demos using 4 different topologies:
1. Demos #1, # 2, and #3 - All the code was deployed into our WebSphere Application Server (WAS) located in our demo z/OS system in Austin, Texas.
2. RPG Demo #1 - (WAS and RPG Web Service on System i)
3. RPG Demo #2 (WAS on System z and RPG Web Service on system i)
4. IMS Demo #4 (WAS on System z and the IMS Service deployed as Java - JCA using RAR connectors - in the WAS also)
1.0 Creating the iPhone Web 2.0 for COBOL/CICSTo explain this code creation I will split in two parts.. Creating the Web Service provider (under CICS) and creating the Web Service requester (iPhone).
Part 1 – Create the COBOL/CICS SOAP Web ServiceThis was very easy, since I have been doing that since 4 or more years ago.
Basically using an existing COBOL/CICS program and the RDz wizards the CICS SOAP Web Service is created and WSDL is generated. The code is deployed into the CICS also using RDz facilities. The XML parsing is done by the COBOL generated by RDz.
You can see a tutorial as well do it yourself using the System z Sandbox and the tutorial Wrap existing COBOL programs as Web Services with IBM Rational Developer for System z.
This is the same service that I am using in the option # 2 and option #3 of the demo link.
The option of the demo link is also being explained in the article Modernize your CICS applications with SOA and Web 2.0 using Rational tools.
It’s not easy? The service can be created, deployed and tested using RDz and without any change in the existing COBOL/CICS code.
Given the WSDL generated on part 1, I used RDz and the EGL wizards to create the Rich UI piece.
All the code was deployed into our WebSphere Application Server located in a z/OS system in Austin, Texas.
2.0 Creating the iPhone Web 2.0 for RPGAgain to explain this code creation I will split in two parts.. Creating the service provider (under System i ) and creating the service requester (iPhone), that is similar to the CICS piece.
Part 1 – Create the RPG SOAP Web Service.This is easy and you need the RDi SOA to wrap the RPG existing code into service.This is a bit different that the CICS piece since the Web Service here is deployed in the Application Server, not handled directly by CICS like in the previous example..Using RDi SOA and an existing RPG the SOAP Web Service is created and WSDL is generated. The code is deployed into the System i WebSphere Application Server System i WebSphere Application Server.Again this is very easy, let the tool generated the Java wrapper. The service can be created, deployed and tested using RDi SOA and without any change in the existing RPG code.
Part 2 - Create the Web 2.0 that will invoke the RPG Web ServiceGiven the WSDL generated on part 1 above, I used RDi SOA and the EGL wizards to create the Rich UI piece.
All the code was deployed into our WebSphere Application Server located in the System i, also located in Austin, Texas.
In this demo I decided to have to different options. In the demo RPG demo #1 this is on System I and in the RPG demo #2the Rich UI and AJAX proxy are located in our z/OS system. In both demos the SOAP Web Service is deployed in the System I Application Server.
3.0 Creating the iPhone Web 2.0 for IMSI could create Web services as I did with CICS, generating COBOL adapters to do the SOAP parsing, but I decided to have other approach here. I used the Java connectors to create the web services using the JCA adapters (using RAR - J2EE Resource Adapters) and deployed the generated Java web service to WAS on z. The XML parsing here is done by Java, not by the COBOL adapters. The idea was to compare the response time.
Part 1 – Create the Java SOAP Web Service.This is easy and you need the RDz with Java or RAD (Rational Application Developer) to wrap the existing COBOL/IMS code into Java Web Services.
I used the J2C wizards (part of RDz with Java or RAD). The wizards also generated the WSDL as well the Java code (EAR file) that I deployed into WAS on z. Again, note that this is a bit different that the CICS demo since the XML parsing is done by JAVA (not COBOL as in CICS) and the EAR iss deployed in the Application Server.
Part 2 - Create the Web 2.0 that will invoke the Java Web Service that will invoke the existing COBOL/IMS code.Given the WSDL generated on part 1 above, I used RDz with EGL as I did before with CICS to create the Rich UI piece.
All the code was deployed into our WebSphere Application Server located in the System z.
To execute this use:
4.0 Running the demoYou can demonstrate this using either an iPod touch connected via WI-FI or using an iPhone connected to a network. Also you may demonstrate using Browser emulators for the iPhone.
For the demo sequence as well a PDF that you can print, see the attached file.
5.0 Flash movies provided.I have uploaded two movies that may help you. You must download the *.wmv appended on this blog. Sorry my "Boston" accent.. :
1. How the COBOL/CICS Demo was built using RDz and EGL Rich UI.
2. The demo in action using an iPhone browser emulator.
3. The demo in action using an iPhone browser emulator.