Manage Learn to apply best practices and optimize your operations.

Overhead costs due to frequent ASKTIME calls

One of our CICS-DB2 programs (it's a background transaction) continuously updates a DB2 table (this table is also used by other online transactions in read-only).

In order to release the update locks frequently, we intend to take syncpoints every 15 seconds of elapsed time. In order to determine if 15 seconds elapsed, we plan to get current time using ASKTIME after every update. What kind of overhead will we incur because of frequent ASKTIME calls or is there a better way to keep track of elapsed time.

Thanks for your help.

The performance impact of issuing an XC ASKTIME will be different depending upon the release of CICS and the fix level.

In CTS 2.2, DB2 access can run on its own L8 TCB. So, if you arrange the relevant program to obey the threadsafe criteria, then you will get significant performance benefits. Unfortunately, XC ASKTIME is not threadsafe so there will be a lot of TCB swapping back and forth that will not do wonders for speedy execution.

If your program is in Assembler, then I'd issue a STCK instruction to get the timing information -- this is the fastest way of getting the system time and a trivial subtraction will give you the required interval.

If you are in COBOL or PL/1, I'd write a statically linked assembler routine (don't CICS translate it) which issues the STCK and returns the value (and maybe get rid of the lower ticks as these are not relevant to your level of granularity).

Robert Harris
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

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.

Please create a username to comment.