ADSM-L

Re: Automatic checkin on a 3584?

2003-03-03 05:56:44
Subject: Re: Automatic checkin on a 3584?
From: GUILLAUMONT Etienne <eguillau AT RGB-TECHNOLOGIE DOT FR>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 3 Mar 2003 11:56:08 +0100
Hello,

Here is what I use on AIX4.3.3 to make automatic checkin every morning, it
is done in ksh.

     #!/bin/ksh
     dsmadmc -id=admin -pa=admin "checkin libv l20 search=bulk
checkl=barcode status=private"
     sleep 15
     REQNO=$(dsmadmc -id=admin -pa=admin "q req"|grep ANR8373I| awk '{print
$2}'|tr -d ':')
     dsmadmc -id=admin -pa=admin "reply $REQNO"

I hope it will help you.

I don't understand why you have to issue two checkin, one with
status=private and the other with status=scratch, but I am not sure I fully
understood this option and anyway, I only need the private status.
But if you need to issue both, I guess you can let TSM a long time to
finish the first checkin, something like 10 minutes. Usually, checkin of
new volumes is not that urgent.


Etienne GUILLAUMONT
e-mail : etienne AT rgb-technologie DOT fr

RGB Technologie
Parc d'Innovation, Bâtiment PYTHAGORE
11 Rue Jean SAPIDUS
67400 ILLKIRCH
Tél :  03 90 40 60 60
Fax : 03 90 40 60 61


                                                                                
                                                              
                    Halvorsen                                                   
                                                              
                    Geirr                To:     ADSM-L AT VM.MARIST DOT EDU    
                                                                     
                    Gulbrand             cc:                                    
                                                              
                    <gehal@WMDATA        Subject:     Re: Automatic checkin on 
a 3584?                                                        
                    .COM>                                                       
                                                              
                    Sent by:                                                    
                                                              
                    "ADSM: Dist                                                 
                                                              
                    Stor Manager"                                               
                                                              
                    <ADSM-L AT VM DOT MA                                        
                                                                     
                    RIST.EDU>                                                   
                                                              
                                                                                
                                                              
                                                                                
                                                              
                    03/03/2003                                                  
                                                              
                    10:06                                                       
                                                              
                    Please                                                      
                                                              
                    respond to                                                  
                                                              
                    "ADSM: Dist                                                 
                                                              
                    Stor Manager"                                               
                                                              
                                                                                
                                                              
                                                                                
                                                              




Hi Dan,
I'm just about to do something like you, and I just have the following
idea.
>From experience, a 10 sec. wait is enough for the request to be generated
in
tsm, so either a wait statement that waits 10 seconds, or creating a
for-loop that runs for about 10 seconds, and then continue.
Another idea, would be to (repeatedly) issue command q req, and on the
right
RETURN code (0), continue the script.
I can't remember how to catch the return code through dsmadmc, but I'm sure
someone else on the list can tell us. (or you could use the command with
the
outfile option, then parse the file for the info wanted.

My best choice would be to use a wait, that waits long enough for the
request to be created, just because it makes the script shorter (usually).

Rgds.
Geirr G. Halvorsen

-----Original Message-----
From: Dan Foster [mailto:dsf AT GBLX DOT NET]
Sent: 3. marts 2003 09:24
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Automatic checkin on a 3584?


Howdy -

        I seem to be having some sort of timing issues with the checkin
process via an automated script. The procedure:

        1. Fill the I/O station(s) with brought back tapes to be checkin'd
        2. Issue a 'checkin libvol <library> search=bulk status=scratch
                checklabel=barcode'
        3. Wait a bit for a request to appear in the request queue
        4. Issue a reply corresponding to what appears in 'q req'
        5. Wait a bit for the whole checkin process to finish in search
mode
        6. Issue a 'checkin libvol <library> search=bulk status=private
                checklabel=barcode'
        7. Wait a bit for a request to appear in the request queue
        8. Issue a reply corresponding to what appears in 'q req'

        Manually, works great. My script parses all data just fine using
dsmadmc in batch mode (with -id= -pass=...) and the command syntax is
correct -- I know because it works fine by hand.

        I'm a little stuck in getting the exact timing *just right* for the
delays as well as the best way to construct a while loop logic to get the
timing right. It just runs through it so fast that it exits before it's
got a chance to answer both requests. Detecting certain corner cases seems
a little interesting when you throw in vagaries of timing, also.

        Alas, "cheating" by direct loading and using search=yes to avoid
the requests isn't an option for the weekly tape swaps. ;)

        Does anyone happen to have a similiar script fragment or even just
suggestions on how to construct the while loop 'just so'? :) Anything would
be much appreciated! (I'm trying to make the limited human interaction with
tapes reasonably bulletproof without requiring them to manually wade
through TSM - reduces chances of errors and not all personnel are skilled.)

-Dan


<Prev in Thread] Current Thread [Next in Thread>