How can I stop the thread (Status STOP) after receiving a NAK (AR) with 3 Retries.
After stopping the Thread I want to sent a mail.
Which steps must I take to solve this problem?
You can do this by utilizing a proc in the ‘TPS Inbound Reply’ context of your outbound thread. The proc can check the reply, and if it is a NAK, write the message to the error database and send an e-mail. Attached is a proc that we have on one of our thread that does this type of logic. You can use it as a reference to develop one of your own. We also have an alert configured that if something gets written to the error database for this thread, it puts the thread “on hold”.
Hi Jim,
Thanks for your tcl-script, it it very usefull.
You mentioned also an alert that puts the thread on hold. Can I have the configuration for the alert.
You already have a proc that does most of what Jim says, cl_check_ack in $HCIROOT/tclprocss/recover.tcl.
Simply copy this to a name of your own choosing then simply modify the part where after three tries it sends to the Error DB. Make sure it still goes to Error DB and send your email at that point.
I would suggest you shut down the process and not the thread. If the process is busy the command may time out and the thread not stopped. Either put this thread in its own process or with other threads that are OK to go down at the same time.
As for the shutdown, I would exec a shell script in the background that would wait a couple of seconds to allow the thread to continue long enough to get message to the Error DB
We don’t have the cl_check_ack tclproc. For that we have a validateReply60 that handle the ACK messages.
Good to know that the Thread must have his own process.
Do you have an example of the shell script? Thanks
You should have the cl_check_ack proc. It is shipped with Cloverleaf. As I said it is in the file $HCIROOT/tclprocs/recover.tcl. I have no idea what validateReply60 does.
The shell script would be a two line script like;
sleep 2