Our CICS/COBOL/VSAM application needs to access a relational database on another platform. What are the different methods to achieve this (JAVA in CICS, vendor tool, etc.)?
If this is DB2, then you don't have a problem. The DB2 instances residing in your MVS image can quite happily dispatch the request to other DB2s running elsewhere. In this case, you don't have anything special to do in the CICS application.
The next choice would be to contact the database vendor and ask if they have an RMI adapter that will run within CICS. If so, then you could issue a call in your application via a TRUE to the RMI adapter that would send off the request to where ever the database resided.
If neither of these approaches is available, then you could fall into the trap of using a database access designed for a batch job. This will be bad news on the performance front if running in the CICS environment so avoid this pitfall.
I think I'd be very inclined to go down the Java route, using JDBC 2.0 and CTS 2.2. I'd expect all vendors have a JDBC interface defined for their product and so this should be able to run within CICS. This would allow either static or dynamic SQL calls to be issued via the standard JDBC interface which means you can switch database vendors with a minimum of trouble as the JDBC interface is designed to be very general in character. You would simply write a Java class (one which starts with a main method and is defined to CICS via a RDO program object) and then XC LINK to it to do the foreign database activity.
Try to avoid doing a JNDI lookup. This will be bad news on the performance front. This is a trade off between strict portability (using JNDI/LDAP to get the address of the foreign database which is slow) and performance (hard-coding the info, much faster but with a potential maintenance penalty).
One thing to worry about is the UnitOfWork implications. The database UoW and the CICS UoW will probably be distinct so you could run into coordination and recovery problems.
CICS Technical Strategist -- CICS expert at Search390.com
Editor's note: Do you agree with this expert's response? If you have more to share, post it in one of our .VO7aaqqaAFk.0@/search390>discussion forums.
Dig Deeper on IBM system z and mainframe systems
Related Q&A from Robert Crawford
For better mainframe capacity planning, how do I convert CPU hours to MIPS? And is there a way to calculate the relationship between MIPS and MSUs? Continue Reading
I have two years of experience in mainframe technology, currently working as a mainframe developer. I want to change to Java technology. Continue Reading
I want to replicate DB2 from the mainframe to an AIX box since it's cheaper and the copy can be used for testing. Is this possible? Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.