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.
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
ble1
4 Operator
•
14.4K Posts
0
August 21st, 2007 03:00
Andrew16
44 Posts
0
August 21st, 2007 03:00
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.
ble1
4 Operator
•
14.4K Posts
0
August 21st, 2007 03:00
Andrew16
44 Posts
0
August 21st, 2007 04:00
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?
Andrew16
44 Posts
0
August 21st, 2007 05:00
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?
Danne-Murphy
1 Rookie
•
121 Posts
0
August 21st, 2007 05:00
for /f %%I in (f:\scripts\eject_tapes.txt) do nsrjb -w -N %%I
vsemaska
194 Posts
0
August 21st, 2007 05:00
Vic
vsemaska
194 Posts
0
August 21st, 2007 05:00
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
Andrew16
44 Posts
0
August 21st, 2007 06:00
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?
Danne-Murphy
1 Rookie
•
121 Posts
0
August 21st, 2007 07:00
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.
ble1
4 Operator
•
14.4K Posts
0
August 21st, 2007 10:00
the '3months' pool are in the tape library.
It will if you use location field pointing towards library name.