4 Operator

 • 

14.4K Posts

August 21st, 2007 03:00

Command to do that is nsrjb. Recently there has been tread on this subject too so I would suggest to read it.

44 Posts

August 21st, 2007 03:00

thanks for that

i think i have missed an important point that makes things difficult.

we want the tapes ejected without knowing what they are.

without looking to see tape volumes used etc....

that command ejects the tapes yes, but not sure if it will allow to used tapes from 1 day ago to be ejected.

4 Operator

 • 

14.4K Posts

August 21st, 2007 03:00

You could create list of volumes based on what tapes you wish to eject with mminfo command. Then use nsrjb command to eject those tapes.

44 Posts

August 21st, 2007 04:00

yes i think i am getting some where

i have used mminfo and i have a text file called tapes_eject.txt

this is the used tapes

i just need to do a nsrjb command to eject them without having to specify the actual names but the contents of the text file instead?

44 Posts

August 21st, 2007 05:00

i'm using windows

mminfo -av -q "pool=3MONTHS, savetime>= 1 days ago, location=PV136T" -r volume > "e:\scripts\slots_eject.txt"

this command gives my tapes used the previous night in the text file "slots_eject.txt"

i'm happy with this.

How can i do a nsrjb command to look at this text file and eject those tapes, is that possible?

1 Rookie

 • 

121 Posts

August 21st, 2007 05:00

I use this command to read a file in Windows to eject tapes.

for /f %%I in (f:\scripts\eject_tapes.txt) do nsrjb -w -N %%I

194 Posts

August 21st, 2007 05:00

The nsrjb command doesn't accept files as input so you'd still have to write a script to read the file and execute the unload and withdraw commands for each volume. I've never written scripts in Windows so I can't help you there.

Vic

194 Posts

August 21st, 2007 05:00

As far as I know mminfo won't tell you which tapes in the '3months' pool are in the tape library. The thing I would do is parse the output from nsrjb. Something like this (assuming you're running Unix/Linux):

for volnme in $(nsrjb -s PV136T | grep ' 3months ' | awk '{print $4}')
do
echo "Press when mail slots are empty:\c"
read inp
nsrjb -u -s PV136T $volnme
nsrjb -w -s PV136T $volnme
done

Message was edited by:
Victor Semaska

44 Posts

August 21st, 2007 06:00

thanks for that

for /f %%I in (e:\scripts\slots_eject.txt) do nsrjb -w -N %%I

i get the error %%I was unexpected at this time

do you know what that means?

1 Rookie

 • 

121 Posts

August 21st, 2007 07:00

if you are doing it from command line it should be

for /f %I in (f:\scripts\eject_tapes.txt) do nsrjb -w -N %I

In bat file, command is for /f %%I in (f:\scripts\eject_tapes.txt) do nsrjb -w -N %%I

See help in windows for for command fo more info.

4 Operator

 • 

14.4K Posts

August 21st, 2007 10:00

As far as I know mminfo won't tell you which tapes in
the '3months' pool are in the tape library.

It will if you use location field pointing towards library name.
No Events found!

Top