Page 1 of 2

Stopping a started MQ transaction with a JCL PARM to a TOR

PostPosted: Fri May 23, 2008 1:45 am
by freelar
I am having issues after a job I have opens files, enables transactions and enables a CICS MQ transaction and starts the task. When I use a job to shut down files and disable the MQ transaction the task keeps running. This is causing the process to pull in messages from the queue after I don't want it to. I've disable the transaction in the TOR and AOR but the task keeps running.
This is the Start process, I need a Stop process as the transaction disable doesn't stop the task: T151CICS,STRT,MF20,,,

Thank you,
Rick

CICS Program doing CEMT commands to stop a Started Task

PostPosted: Sat May 24, 2008 2:21 am
by freelar
Let's try this a different way, can a CICS program be started up and go out do a CEMT Purge command on a started task?

Re: CICS Program doing CEMT commands to stop a Started Task

PostPosted: Sat May 24, 2008 4:02 am
by dick scherrer
Hello,

can a CICS program be started up and go out do a CEMT Purge command on a started task?
How are you defining a started task? CEMT is used within the cics region where it is issued. . .

Re: CICS Program doing CEMT commands to stop a Started Task

PostPosted: Sat May 24, 2008 6:27 pm
by CICS Guy
freelar wrote:can a CICS program be started up and go out do a CEMT Purge command on a started task?
Yes...
I am having issues after a job I have opens files, enables transactions and enables a CICS MQ transaction and starts the task. When I use a job to shut down files and disable the MQ transaction the task keeps running.
If your long running transaction does not have any programmed 'stop' code, then a purge is what you will need to do.
You could set up a simple flag to alert the task to stop, if ithe task looked at the flag prior to processing the MQ input.
Why isn't the MQ reader a short running transaction, triggered by MQ and only running when data is available?
Either way, you could set up a simple flag to alert the task to stop, if the task looked at the flag prior to processing the MQ input.

Re: CICS/MQ Started Task Shutdown Issue

PostPosted: Tue May 27, 2008 7:11 pm
by freelar
Thanks guys I didn't write the program and came in later in the project I just have to figure out how to fix this issue and will pass this along.

Rick

Re: CICS/MQ Started Task Shutdown Issue

PostPosted: Wed May 28, 2008 2:42 am
by dick scherrer
Hello,

I didn't write the program and came in later in the project I just have to figure out how to fix this issue
Even though you didn't write the original code, it sounds like you've inherited it :)

If you are now responsible for care and feeding, you may want to enhance the code to resolve this.

Good luck :)

d

Re: CICS/MQ Started Task Shutdown Issue

PostPosted: Wed May 28, 2008 8:20 pm
by freelar
Think I messed up my last message, another question please and I'll make this shorter. When the program receives the message or flag how does it issue the stop or purge on the started task?
I've looked on-line and in the IBM on-line manuals but have yet to find it. Do you happen to know it or where I can find it?

Thanks, Rick

Re: CICS/MQ Started Task Shutdown Issue

PostPosted: Wed May 28, 2008 11:28 pm
by CICS Guy
freelar wrote:When the program receives the message or flag how does it issue the stop or purge on the started task?
GOBACK?

Re: CICS/MQ Started Task Shutdown Issue

PostPosted: Thu May 29, 2008 3:19 am
by freelar
Thanks we just found and used the Goback before I read this and it works good.

Re: CICS/MQ Started Task Shutdown Issue

PostPosted: Thu May 29, 2008 4:18 am
by dick scherrer
Good to hear it is now working - thank you for letting us know :)

d