0

I have a batch job and a CICS transaction that use the same db2 tables. Both run at regular intervals and the batch job abends once in a while due to contention with the shared DB2 tables.

Is there a way to schedule the job in CA7 (job scheduling tool) to prevent it from running when the transaction is active?

Tonan
  • 147
  • 1
  • 1
  • 9

2 Answers2

1
  1. Disable the CICS transaction before starting the batch job, re-enable it when the batch job ends.
  2. Modify the batch job to use commit intervals, similar to this answer.

Checking to see if the CICS transaction is active is unlikely to behave as you wish. It may be inactive when you check, then you start your batch job, then the CICS transaction becomes active.

Update #1


Though you don't specify, I'm getting the impression this is a long-running CICS transaction and not the normal OLTP-style transaction that finishes in less than 0.10 seconds of clock time.

If this is the case, then creating a batch program that uses the EXCI to execute a CICS program that uses the CICS SPI INQUIRE TASKLIST to locate your transaction may be the way to proceed. If you've got CA-DADs PLUS then you might be able to do this with that product instead of writing programs.

cschneid
  • 10,237
  • 1
  • 28
  • 39
  • I cannot disable the CICS transaction if it is already running right? Commit intervals are already present. I am just trying to eliminate the manual work of restarting the job if it abends. – Tonan Jun 08 '21 at 07:18
  • Also it does not matter if the transaction times out because the job hold the tables. The transaction will try again later. I need the job to not run when the transaction is already running to prevent the timeout. – Tonan Jun 08 '21 at 07:24
  • Yes, it takes more than 10 seconds at times. We don't have CA-DADs PLUS. I will have to try the EXCI method then. Thank you. – Tonan Jun 09 '21 at 14:49
0

Please refer to the below thread to see whether it helps you in overcoming the issue.

https://ibmmainframes.com/about12949.html

Regards, Anbu.