Unsolved
This post is more than 5 years old
2 Posts
0
1895
Eject script for networker 7.6.2 with IBM TS3310 Changer
I need some help to create a eject script to eject 4 different media pools and list the media pools in a text file
If I use the script below it will eject all tapes used in the last week but not put the media pool in the text file, which I need for retention periods
@echo off
echo "Reseting Jukebox"
nsrjb -H
echo "Getting Eject List"
mminfo -t "last week" -q location=IBM@xx.xx.xx -r volumes > c:\xx_eject.list
echo "List of tapes to eject:"
type c:\xx_eject.list
pause
echo "Ejecting tapes"
for /F "eol=;tokens=1,2*" %%i in ('type c:\xx_eject.list') do nsrjb -w %%i
echo "Inventory Jukebox"
nsrjb -IE
echo "Please check output ports for correct tapes"
pause
Anonymous
5 Practitioner
5 Practitioner
•
274.2K Posts
0
March 27th, 2012 11:00
The mminfo command is your way of controlling the output, so look at the command reference guide and the options available to you in there.
I suspect that a mminfo command like below would get you what you need.
mminfo -t "last week" -q location=IBM@xx.xx.xx -r volumes,pool
This will mean that you have a second column in your list file, so you will need to either deal with that or have 2 list files (run the mminfo command twice) one for the script to eject and one for the record of what was ejected.
The barcode, %used and volflags would also be useful items to include.
Hope this helps
Paul
ble1
14.3K Posts
0
April 30th, 2012 03:00
You said 4 different media pools, but I do not see those in query. So you need to modify mminfo statements as following:
mminfo -t "last week" -q "location= ,pool= ,pool= .pool= ,pool= " -r volumes > c:\xx_eject.list
Of course, you can expand that by listing only volumes which are full and similar...