I have a program written in assembler and it does not contain any CICS command level calls. I assembled this program
once only, then I linked it as two versions, one to run in batch mode and one to run under CICS.
How can this program determine whether it is running under CICS or batch? Can you suggest, in general terms, how I would approach the coding of this test? I want a single piece of program code which works correctly under both batch and CICS.
I keep on getting this question -- and I keep on saying that this is not something of which I approve.
If you must have a chunk of assembler code that can be used in two places, structure it as a copybook and thense include it in two other programs -- one that can be compiled for CICS and the other for batch.
If you really want some control as to which code paths are used, code the source up as an assembler macro which can take a parm of BATCH=Y or N and so, emit the different code that way.
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 Mainframe operating systems and management
Related Q&A from Robert Crawford
With 3270 bridge, you can't stack input messages into one structure. The bridge can't process them all at once. It takes a little more work.continue reading
CICS expert Robert Crawford offers advice on determining the connection between CICS transactions and MQ Queue name.continue reading
CICS expert Robert Crawford discusses if a program can use IXLLIST macros in CICS when IXLLIST are APF.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.