Steve - it is actually pretty easy...after your original eMail I have
included the 'source' of two files that do what you looking for when used
together...they are pretty self-explanitory.  If you know a better way to do
anything, let me know...I am pretty new to scripting and TSM...

-Dustin

-----Original Message-----
From: Automatic digest processor [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 18, 2001 5:07 AM
To: Recipients of ADSM-L digests
Subject: ADSM-L Digest - 16 Aug 2001 to 17 Aug 2001 (#2001-225)

 18. Macros/scripting (2)

----------------------------------------------------------------------

Date:    Fri, 17 Aug 2001 13:58:24 EDT
From:    "Stephen A. Cochran" <[EMAIL PROTECTED]>
Subject: Macros/scripting

I'm still fairly new to ADSM, so bear with me here : )

I'm using ADSM 3.1 server

I want to create a macro which does a 'q volume', but only on the volumes in
the
library currently (the ones listed with 'q libv').

Is there an easy way to do this?

Steve Cochran
Dartmouth College

----------------------------------------------------------------------

=====BEGIN AHEA.SCRIPT=====
#!/bin/ksh
YESTERDAY=$(date +%Y-%m-$(($(date "+%d")-1)))
REPORT="/export/home/kzw2zx/Logs/ahea.report"
mail_list="[EMAIL PROTECTED],[EMAIL PROTECTED]"
uname -n > $REPORT
date >> $REPORT
dsmadmc -server=b5 -id=query -password=query macro
/export/home/kzw2zx/Scripts/ahea.macro
mailx -s "Apsb5 Report - AHEA - $YESTERDAY" $mail_list < $REPORT
=====END AHEA.SCRIPT=====

=====BEGIND AHEA.MACRO=====
q ev * AHEA begind=-1 begint=08:00 endd=today endt=08:00 >>
/export/home/kzw2zx/Logs/ahea.report
select DATE_TIME, NODENAME, MESSAGE from ACTLOG where SCHEDNAME = 'AHEA'-
        and DATE_TIME>=(cast(current_date -(1 day) as timestamp) + (8
hours))-
        and DATE_TIME<(cast(current_date as timestamp) + (8 hours))-
        and MESSAGE LIKE '%bytes transferred%' >>
/export/home/kzw2zx/Logs/ahea.report
=====END AHEA.MACRO===== (notice the use of minus as a line-continuation)

Reply via email to