Thanks for your reply. I don't know much unix at this point. Could you send me a sample of the script you are talking about ? I would most certainly appreciate it.
please make amendment to the above script in the following piece only as follows:
if [[ $STAT -ne 1 ]] then
mail -s "tws job $jobname failed" pagenumber@abc.com </tmp/tws.job.status
fi
sushveer
IBM certified specialist-p-series AIX5L System Administration
AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator
STAT=`cat /tmp/tws.job.status| grep "Exit Status"|grep 0|wc -l`
if [[ $STAT -ne 1 ]] then
mail -s "tws job failed " pagenumber@abc.com </tmp/tws.job.status
else
exit 99
fi
SCRIPT 2:
If you just want to be paged that "the job in TWS is abended"
You can use the following script for brevity
----------------------------------------
#!/bin/ksh
#script title :/path_to_dir/twsJob.abend-notify.ksh
/maestro/bin/conman "sj @#@+state=abend" << EOJ> /tmp/status.txt
quit
EOJ
cat /tmp/status.txt|grep -v sj |grep ABEND >/tmp/abend.txt
ABENDNUM=`cat /tmp/abend.txt|wc -l`
if [[ $ABENDNUM -ge 1 ]] then
mail -s "tws job abend report" pagenum-orusername@abc.com </tmp/abend.txt
fi
-----------------
Note : my first script gives the notification and the reason from failure(whatever in stlist says)
second script just notifies the abended job in tws
Both are tested and working fine in my shop.
That's it!
sushveer
IBM certified specialist-p-series AIX5L System Administration
AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.