ADSM-L

Macros/scripting

2001-08-17 13:58:24
Subject: Macros/scripting
From: "Stephen A. Cochran" <Stephen.A.Cochran AT CAHIR DOT NET>
Date: Fri, 17 Aug 2001 13:58:24 EDT
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=====
=====BEGIN AHEA.SCRIPT=====
#!/bin/ksh
YESTERDAY=$(date +%Y-%m-$(($(date "+%d")-1)))
REPORT="/export/home/kzw2zx/Logs/ahea.report"
mail_list="person1 AT company DOT com,person2 AT company DOT com"
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)
<Prev in Thread] Current Thread [Next in Thread>