Posted By JimY on 05/12/2010 07:18 PM Check out this link to a script in the Tips and Tricks section of this Web Site. https://www.lawsonguru.co...-Needs-Recovery.aspx
#!/usr/bin/ksh #----------------------------------------------------------------------- # Lawson Jobs in Needs Recovery or Invalid Parms Email Script #----------------------------------------------------------------------- # set lawson environment variables if ps -ef | grep -q [l]adb ; then . cv lawprod MAILADDR=jyoung1@hurleymc.com MAILTO=kburges1@hurleymc.com let x=-1 rngdbdump -n GEN queuedjob -f jobnumber jobname username actstartdate actstarttime -v status=34:35 | while read line do let x=$x+1 JOBNUMBER=`echo $line | cut -d ' ' -f 1` JOBNAME=`echo $line | cut -d ' ' -f 2` USERNAME=`echo $line | cut -d ' ' -f 3` STARTDATE=`echo $line | cut -d ' ' -f 4` STARTTIME=`echo $line | cut -d ' ' -f 5` JOBRECOV[$x]="Jobnumber: $JOBNUMBER Jobname: $JOBNAME Username: $USERNAME Start Date: $STARTDATE Start Time: $STARTTIME\n" done else JOBRECOV="" fi if [[ $JOBRECOV = "" ]]; then echo "No jobs in Needs Recovery or Invalid Parms" else (sleep 5 echo EHLO sleep 5 echo MAIL FROM: $MAILADDR sleep 5 echo RCPT TO: $MAILADDR sleep 5 echo RCPT TO: $MAILTO SLEEP 5 echo DATA sleep 5 echo From: $MAILADDR echo To: $MAILADDR echo To: $MAILTO echo subject: Jobs In Needs Recovery/Invalid Parms echo echo ${JOBRECOV[*]} echo sleep 5 echo . sleep 5 echo QUIT sleep 5) | telnet 00.00.00.00 {port number} fi
I want to do the same for Landmark can you please guide me.