I have a question about an intentional delay we have in a long running transaction in CICS. Currently the methods I know of in which to do this is with a EXEC CICS SUSPEND or an EXEC CICS DELAY. The DELAY has a minimum of one second that causes the queue of records it processes to become too long. However, if I use the SUSPEND the queue catches up but the transaction consumes too much of the CPU.
Do you know any way to cause CICS to wait for a time period of less than one second for example a half a second or quarter of a second?
I'm afraid that the granularity of the XC DELAY is in seconds and the smallest is 1 second. Any wait that you could artificially cause would prevent other work arriving in your queue and so not achieve what you want. So, you need a solution that does not lock the QR TCB that would permit the QR TCB to build up the queue (for a bit). What I'm going to suggest now is VERY sneaky and would not be approved of by my chums in Development. Do it at your own risk. I'm assuming CTS 2.2 - CTS 1.3 can't do this trick. I don't really recommend it anyway but that's your decision. Try issuing a fake DB2 call. This will cause your transaction to executing under one of the (new) DB2 TCBs within CICS. Then issue a suitable XC Command to get you back to the QR TCB. The problem is that we keep enhancing the number of XC commands that will STAY on the DB2 TCB. You want one that is guaranteed to swap back to the QR TCB. There are no guarantees (that's why this is risky amongst other things) but a File Control command should to do biz. However, this may stop working in the future. Nevertheless, once you issue you XC READQ this will probably force a switch back to QR anyway. However, it may be that this switching takes longer than an elapsed second to do (so defeating the object of the exercise) and you will certainly up the CPU overhead of the transaction. So BEWARE!
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 IBM system z and mainframe systems
Related Q&A from Robert Crawford
For better mainframe capacity planning, how do I convert CPU hours to MIPS? And is there a way to calculate the relationship between MIPS and MSUs? Continue Reading
I have two years of experience in mainframe technology, currently working as a mainframe developer. I want to change to Java technology. Continue Reading
I want to replicate DB2 from the mainframe to an AIX box since it's cheaper and the copy can be used for testing. Is this possible? 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.