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

Can I 'call' a CICS COBOL module from a batch COBOL program?

Find out what happens when you try to make a call to a CICS COBOL module from a batch COBOL program.

Is it possible to pass parameters and make a "call" to a CICS COBOL module from a batch COBOL program in a batch...

environment? 

The short answer is no. I've done this accidentally and what happens is the CICS program gets a S0C1 abend when it makes its first call.

That being said, there are ways to write programs so they can run in batch and CICS. However, the program does need to be aware of its environment to avoid issuing any CICS commands. Fortunately, LE provides a couple of functions that can tell you where the program is running. I would look through the LE bookshelf to find out more about the available functions.

CICS also provides the External Call Interface (EXCI) through which batch jobs can use to communicate with programs running in CICS. A series of EXCI calls builds a communication "pipe" to a CICS region. Through that pipe you can link to a program that will actually execute in CICS. You pass parameters to the program through a COMMAREA just as if the calling program were in CICS, too. Consult the CICS External Call Interface manual (SC34-6006-10) for more information.

This was last published in January 2006

Dig Deeper on IBM system z and mainframe systems

PRO+

Content

Find more PRO+ content and other member only offers, here.

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.

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

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

SearchServerVirtualization

SearchCloudComputing

Close