mr_suleyman
22nd November 2006, 10:37
Hi All Dear Friends,
I remember that there isa thread aout this case. But I couldn't find it . Do you have any exprience about this case. When job fails or stops or interrups then system will send warning mail to user.


Thanks in advice

bdittmar
22nd November 2006, 12:01
Hi All Dear Friends,
I remember that there isa thread aout this case. But I couldn't find it . Do you have any exprience about this case. When job fails or stops or interrups then system will send warning mail to user.


Thanks in advice

Hello,

i'm doing job controll this way.

Regards

mr_suleyman
22nd November 2006, 12:04
How does it works ? How do you check job in shell script ? Do you use crontab for it ?
Could you send me sample shell script ?

Thanks...

bdittmar
22nd November 2006, 13:16
How does it works ? How do you check job in shell script ? Do you use crontab for it ?
Could you send me sample shell script ?

Thanks...

Hello,
in crontab the job is analized for "runtime errors" !

# Bernd Dittmar (01.06.2004)
# Script to Call ba6.1 with Session dhaad5411m0bd
# Analyses the Job "KORREK" of the actual date for runtime error

TERM=vt220
BSE=/daten/bse
BSE_TMP=/daten/tmp

export BSE BSE_TMP TERM


# Call BaaN

exec /daten/bse/bin/ba6.1 dhaad5411m0bd

Neal Matthews
22nd November 2006, 13:52
Alternative would to be to Print Job Data ttaad5400 for status runtime error only and E mail any output via a script.

Cheers
Neal

mr_suleyman
22nd November 2006, 14:26
Thanks btmitter and Neal , I got it !

en@frrom
23rd November 2006, 10:46
Suleyman, if you post your solution, others may benefit from it as well...

mr_suleyman
23rd November 2006, 13:51
By means of these suggestion and I discovered another thread. My solution is to run crontab job in unix. This is done by using timer. According to this timer unix script will check there is a error in job shedule. To get error you can use following structure. (this is from another thread):

$BSE/bin/qptool6.1 -c$compnbr -q"select jsta, user, cjob, ttaad500.desc from ttaad500 where (jsta=2 or jsta=4 or jsta=5 or jsta=7)" >> $DIR/JobStatusTemp.txt 2>&1

# STATUS (jsta)
# 1=Free
# 2=Waiting
# 3=Running
# 4=Canceled
# 5=Runtime error
# 6=In queue
# 7=Blocked
# JOB NAME (cjob)


On unix :I will check these results by reading values in text. According to value I can send email to concerned person.This is my solution or my understanding. But I haven't completed my working yet.