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 first published in January 2006