-----Original Message-----
From: Taw.Raymond 
Sent: Friday, April 12, 2002 10:45 AM
To: 'ADSM: Dist Stor Manager'
Subject: RE: 3494 library swap out


Please try the following script and let me know

#!/usr/bin/ksh
## 3584lib is the TSM library name; replace 3584lib with your TSM library name
## -pass=admin  where admin is the password of admin userid; replace admin with your 
password
ADSM="dsmadmc -id=admin -pass=admin"
$ADSM "q libv 3584lib" | /usr/bin/awk '/Private/,/Scratch/ {print $1, $2}' |\
while read libname volid
do
  echo "checkout libv $libname $volid checkl=no rem=no"        ## comment this line
  ### $ADSM "checkout libv $libname $volid checkl=no rem=no"   ## uncomment this line
done

Regards,
Raymond Taw


-----Original Message-----
From: Gill, Geoffrey L. [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 12, 2002 9:38 AM
To: [EMAIL PROTECTED]
Subject: 3494 library swap out


Ok, lots of help here from Bill, Lindsay and Tab,  and I appreciate it very
much. Now here is a stab at the steps I need to take. Since I'm not much of
a script/programmer I'd appreciate any help in correcting mistakes I've
made.

Note: This will be done from an AIX console on the TSM server.

Step1:  SET SQLDISPLAYMODE WIDE

Step2:  select 'checkout libv ' || trim(library_name) || ' ' ||
trim(volume_name) || ' checkl=no rem=no' from libvolumes > /tmp/vols

Step3:  cat /tmp/vols | awk '{print "checkout libv library_name $1 checkl=no
rem=no"}' >/tmp/macro

Step4:  dsmadmc -id=... -pas=... -itemcommit macro /tmp/macro

The output of the file in step2 goes like this:

checkout libv 3494LIB U00008 checkl=no rem=no
checkout libv 3494LIB U00026 checkl=no rem=no
checkout libv 3494LIB U00244 checkl=no rem=no
checkout libv 3494LIB U00302 checkl=no rem=no
And so on and so on.

I'm sure my step3, which I took direct from the email Lindsay sent, needs
work.

A little help......again please.
Thanks,

Geoff Gill
TSM Administrator
NT Systems Support Engineer
SAIC
E-Mail:   [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Phone:  (858) 826-4062
Pager:   (877) 905-7154

Reply via email to