ADSM-L

Re: Auto reply to request

2001-02-21 10:47:30
Subject: Re: Auto reply to request
From: George Lesho <glesho AT AFCE DOT COM>
Date: Wed, 21 Feb 2001 09:49:43 -0600
The fellow who did this job before me was a scripting kind of guy... I think he
wrote this perl script. You might be able to adapt it or part of it to your
environment - George Lesho:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/usr/local/bin/perl

#------------------------------------------------------
# Find out which libraries exist
# Then display menu
#------------------------------------------------------
$count=0;
$slotcount=0;
$labeled=0;
system("tput clear");
print "\n\tPlease Choose a Library\n\n";
        push(@libs, "dummy");
open(libraries, 'dsmadmc -commadelimited -id=query -pass=query q libr |grep
SCSI|');

while (<libraries>) {
        $l=$_; chomp($l);
         @record=split(/,/, $l);

        $libname=$record[0];
        push(@libs, $libname);
                }
for ($i=1; $i <= $#libs; $i++) {
print "\t";print $i;print "\t$libs[$i]\n";

                              }
print "\nMake a  Choice or Press Enter to Quit --> ";

#------------------------------------------------------
# Get users choice, if empty the exit
#------------------------------------------------------
$choice = <STDIN>;
chomp($choice);
if ($choice eq "") { exit}

$library = "$libs[$choice]";
print "lib = $library\n";
system("tput clear");
print "About to label New ADSM Scratch Tapes, please wait a moment ...\n";
system("dsmadmc -id=query -pass=query label libv $library search=bulk
labels=barcode checkin=scr overwrite=no >> /dev/null") ;
sleep 3;
        print "\n";
open(libraries, 'dsmadmc -consolemode -commadelimited -outfile -id=query
-pass=query |');
while (<libraries>) {
while (<libraries>) {
        $l=$_; chomp($l);
         @actlog=split(/ /, $l);
        if (($actlog[0] eq "ANR8373I") and ($actlog[9] eq $library))   {
         $replyid=$actlog[1];
        $replyid=~tr/://d;
        system("dsmadmc -id=query -pass=query reply $replyid >> /dev/null");
                                                                        }

        if ($l =~ /^ANR(8810|8806|0985|0986)/) {
        print "$l\n";
                                        }
        if ($l =~ /^ANR8801/) {
        print "$l\n";
        exit;
                               }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~






"Forgosh, Seth" <sforgosh AT TIAA-CREF DOT ORG> on 02/20/2001 04:13:24 PM

Please respond to "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>

To:   ADSM-L AT VM.MARIST DOT EDU
cc:    (bcc: George Lesho/Partners/AFC)
Fax to:
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
**********************************************************************
<Prev in Thread] Current Thread [Next in Thread>