Ask the Expert

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?


    Requires Free Membership to View

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
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 .VO7aaqqaAFk.0@/search390>discussion forums.


This was first published in July 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: