Jake wants to interrupt a DB2 query while it is running (possibly very long
running).

I'm not a DB2 expert and it's been a very long time since I wrote any DB2 code.
Here is how I would try to resolve your problem.

1. Create a control block.
2. Attach a task and pass the control block.
2b. New task waits on ECB in the control block.
3. Init transaction / query
4. save query-id in the control block.
5. Create stimerx with id.
6. start transaction / query.
7. if stimerx pops, then post the ECB in the control block.
7b. The attached task can do a CANCEL QUERY with the saved queryid in the
control block
7c. go back to wait or do what you want
8. If transaction ends and stimerx did not pop, then cancel the stimerx.
9. post the ecb in the control block to terminate the attached task.

Regards, Jon Perryman.



________________________________
From: D E Engelbrecht <[email protected]>
To: [email protected]
Sent: Thu, April 26, 2012 11:55:41 AM
Subject: Re: Request for MVS wait Module - DB2

Jake anderson wrote:

>I am just looking for MVS wait module Source using which I can Combat the
DB2 -911 and -904 error. Are there anyone who could help me in sharing a
MVS wait module which uses the STIMER macro to cancel the DB2 transaction.

Since you got no replies, perhaps it would help if you showed all error
messages fully and also explain what you mean with 'MVS wait module'.

Also why do you want to cancel a DB2 transaction without using standard
DB2 methods?

Groete / Greetings
Elardus Engelbrecht

Reply via email to