Home > Ask the Data Center Experts > Questions & Answers > Accessing a relational database on another platform
Ask The Data Center Expert: Questions & Answers
EMAIL THIS

Accessing a relational database on another platform

Robert Crawford EXPERT RESPONSE FROM: Robert Crawford

Pose a Question
Other Data Center Categories
Meet all Data Center Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 25 April 2003
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.)?

>
EXPERT RESPONSE
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.

Robert Harris
Inventor
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 discussion forums.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
CICS Newsletter
Using External Call Interface (EXCI) to access CICS
Using CICS event monitoring points (EMPs) for tuning and debugging
Implementing CICS managed data tables
Taking advantage of the CICS workload dispatch ratio
CICS 3270 bridge tutorial, part 3: How to start and end a conversation
CICS 3270 bridge tutorial, part 2: Using DFHL3270
Mainframe applications never die: Using the 3270 bridge
Hash table how-tos for mainframe programmers
Can a program use IXLLIST macros in CICS?
CICS socket interface

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsITKnowledge ExchangeTipsBlogsMultimediaWhite PapersEvents
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2005 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts