Connecting COBOL stored procedure from JAVA without using MQ, Direct Call or by Webservice.

Hi All,

We are doing a small POC to migrate MF screens to JAVA based webpages. As a matter of fact, we have created COBOL SPs to call relevant MF DC online programs. In case we need to call COBOL SP, what approach do JAVA team has to follow.

NOTE : IBM MQ is not supported by customer
              IMS DC (IMS is the online component of my customer. IMS and DB2 databases are used by administration system) is not suggested as it needs additional work
              Webservice / business services help should not be used.

What could be the approach do we have to follow?

P.s : I am neither JAVA expert nor Mainframe expert. Since I am managing a project, trying to get suggestions from various areas.

Moreover I heard something like wrapping COBOL stored procedure with DB2 so that it can be converted to DB2 SP(Do we have any approaches like that). In my customer's IT landscape they can call DB2 SP by using ODBC driver.

I am looking forward to see responses from experts.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Amitkumar PSr. ConsultantCommented:
Hi Krishna,

Your question seems interesting to me as calling COBOL SP from Java is very rare use-case according to me (or at least i have never seen). So, i started googling around and found a documentation of Micro Focus Enterprise Test Server. They have provided an example for the same. I tried to download it (trial version) to explore more with the mentioned example, but no luck.

Refer below link (as well as attached snap).

I hope the above will help you. But, lets wait for other experts to get in. They must have batter solution than mine.

Krishnamoorthy AthikesavanAuthor Commented:
Hi Amit,

Thanks for the suggestion. Now I am able to connect. The COBOL SP is actually stored in DB2(with appropriate schema name). Hence JAVA developers just used JDBC connectivity to call that SP.

One more thing to ask - This COBOL SP has calls to external COBOL program. Those cobol programs will execute SQL statements.
Can the external programs be IMS-DC online programs?  Why I am asking is, those IMS DC online programs are written in assembler and it is  quite complex. We are thinking of re-using those programs for our purpose. Can this be achieved?

JAVA --> COBOL SP(stored in DB2) ---> IMS DC online program(with calls to IMS & DB2 databases).

There is no CICS in landscape

Tomas Helgi JohannssonDatabase Administrator / Software EngineerCommented:

According to this you could make use of the DB2 external SP API to access COBOL SP/subroutines as well as Java SP and other DB2 native SP using the DB2 JDBC protocol. In fact, that would probably be your best solution to wrap it using Java as Java is zIIP offloadable. Note that not all of the workload would be zIIP offloadable though.

     Tomas Helgi

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Krishnamoorthy AthikesavanAuthor Commented:
Thanks Tomas

DSNAIMS2 is the method to be used for my purpose. Will try it out and come back in case of any issues.

Tomas Helgi JohannssonDatabase Administrator / Software EngineerCommented:

How did this turn out ?

      Tomas Helgi
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Stored Proc

From novice to tech pro — start learning today.