Problem solve Get help with specific problems with your technologies, process and projects.

Writing a module that accesses DB2 databases and VSAM files

A common module accessing IMS/DB2 databases and VSAM files needs to be developed. This program is then going to be called from a CICS application. The program DOES NOT contain any EXEC CICS statements.

How should this program be LINK and CALLED. Is this a good candidate for EXCI?

I think you mean that you are going to write a module that accesses both DB2 databases and VSAM files through native language interfaces (like an Enterprise COBOL Program). You would call this module (not using CICS facilities) using Language Environment functions but that's only a small part of the picture. I assume you are initiating this action from a CICS transaction.

You would be SEVERLY restricting the functionality of the rest of your CICS region whilst this access is going on. In addition, you will not get any of the transactional support provided within CICS (not the least of which is avoiding a double update problem) and indeed could get into a situation whereby the whole of the CICS region is locked.

My strong advice is not to do this.

If you wanted to run this as a batch job and then send the results to a CICS transaction, then this is certainly possible. The question is how to get the results back to the CICS transaction that started the operation. One way would be to submit the job from CICS and then use the spooling facilities to read the results for the job.

Alternatively, use MQ to create a suitable Q and then get the batch job to send its results to this Q. Indeed, you could go a step further and get MQ to start the batch job as a result of a message arriving into a Q.

You could get the batch job to send its results back to CICS using EXCI. You would write a CICS program to be run as a result of the EXCI XC LINK operation but that means the CISC transaction that started the whole thing off would have to discover where/when the results are available.

My advice would be to drop the whole idea and rewrite the relevant program to use CICS' facilities.

Robert Harris
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

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.