Here is a script that I wrote some time ago that does a auto-reply.
You could try and work this into the way you are presently doing it.
You may have to make some modifications to fit your needs.
Mark Adams
****************************************************************************
*
TMPFILE=/tmp/adsmact.log
ADSMCMD='dsmadmc -id=user -password=password'
#${ADSMCMD} checkin libvolume OMASPCTAPLIB0 $1 checklabel=yes status=scratch
${ADSMCMD} LABEL libvolume omaspctaplib0 search=bulk labelsource=barcode
checkin=scratch overwrite=yes
if [ $? != 0 ]
then
echo "There was a problem with the tape drive -- Check the activity log
to find the problem"
exit 1
fi
############################################################################
##
### WATCH ACTIVITY LOG TO OBTAIN REPLY NUMBER
############################################################################
##
clear
echo "PLEASE WAIT ---- Checking activity log."
while true
do
${ADSMCMD} query actlog begintime=now-0:01 endtime=now msgno=8373 >
${TMPFILE}
if [ $? = 0 ]
then
break
fi
sleep 30
done
REPLY=`grep ANR8373I ${TMPFILE} | awk '{print $4}' | cut -c1-3`
${ADSMCMD} reply ${REPLY}
if [ $? != 0 ]
then
echo "There was a problem with the reply -- Check the activity log to
find the problem"
exit 2
fi
############################################################################
##
### WATCH ACTIVITY LOG TO SEE IF CHECKIN WAS SUCCESSFUL
############################################################################
##
while true
do
clear
echo "Checking activity log."
${ADSMCMD} query actlog begintime=now-0:01 endtime=now msgno=8810 >
${TMPFILE}
if [ $? = 0 ]
then
cat ${TMPFILE}
echo "Checking activity log for a succesful check in."
while true
do
${ADSMCMD} query actlog begintime=now-0:01 endtime=now msgno=8427 >
${TMPFILE}
if [ $? = 0 ]
then
cat ${TMPFILE}
echo "Checkin of libvolume $1 was unsuccessful"
exit 0
fi
done
break
fi
sleep 30
done
*************************************************************************
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED]]On Behalf Of
Forgosh, Seth
Sent: Tuesday, February 20, 2001 4:13 PM
To: [EMAIL PROTECTED]
Subject: Auto reply to request
We have an admin schedule that runs a script to lable and checkin scratch
tapes from the bulk loader on our tape library. The only problem is that
when the script runs, it generates a request to fill the bulk loader and
reply. Since this happens after hours, someone has to either dial-in or let
the job fail. Does anyone know of a way to auto-reply to this request or
even better suppress the request? Any help would be appreciated.
Seth Forgosh
**********************************************************************
This message, including any attachments, contains confidential information
intended for a specific individual and purpose, and is protected by law. If
you are not the intended recipient, please contact sender immediately by
reply e-mail and destroy all copies. You are hereby notified that any
disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited.
TIAA-CREF
**********************************************************************