简体   繁体   English

大型机:如何防止批处理作业和 CICS 事务之间的 DB2 争用?

[英]Mainframe: How to prevent DB2 contention between batch job and CICS transaction?

I have a batch job and a CICS transaction that use the same db2 tables.我有一个批处理作业和一个使用相同 db2 表的 CICS 事务。 Both run at regular intervals and the batch job abends once in a while due to contention with the shared DB2 tables.两者都定期运行,并且由于与共享的 DB2 表争用,批处理作业偶尔会异常终止。

Is there a way to schedule the job in CA7 (job scheduling tool) to prevent it from running when the transaction is active?有没有办法在 CA7(作业调度工具)中调度作业,以防止它在事务处于活动状态时运行?

  1. Disable the CICS transaction before starting the batch job, re-enable it when the batch job ends.在开始批处理作业之前禁用 CICS 事务,在批处理作业结束时重新启用它。
  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.检查 CICS 事务是否处于活动状态不太可能如您所愿。 It may be inactive when you check, then you start your batch job, then the CICS transaction becomes active.当您检查时它可能处于非活动状态,然后您开始批处理作业,然后 CICS 事务变为活动状态。

Update #1更新#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.尽管您没有具体说明,但我的印象是这是一个长期运行的 CICS 事务,而不是在不到 0.10 秒的时钟时间内完成的正常 OLTP 样式事务。

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.如果是这种情况,那么创建一个使用 EXCI 的批处理程序来执行一个使用 CICS SPI INQUIRE TASKLIST 来定位您的事务的 CICS 程序可能是继续进行的方法。 If you've got CA-DADs PLUS then you might be able to do this with that product instead of writing programs.如果您有 CA-DADs PLUS,那么您也许可以使用该产品而不是编写程序来做到这一点。

Please refer to the below thread to see whether it helps you in overcoming the issue.请参阅以下主题,看看它是否有助于您克服问题。

https://ibmmainframes.com/about12949.html https://ibmmainframes.com/about12949.html

Regards, Anbu.问候,安布。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM