Re: LIBVOL Scratch Count
2005-04-21 11:32:54
Joni,
As some others have mentioned it has to do with the case of 'Scratch' in
you select statement.
I thought I would just show you a little script that I use to check my
library. I call it chklib and it has three lines as follows:
select home_element,volume_name,status from libvolumes order by home_element
select count(status) as "Scratch" from libvolumes where STATUS='Scratch'
select 19-count(status) as "Empty Slots" from libvolumes
The first line list the contents of the library ordered by the element
number. I like that much better than by volume number. The second line
gives me a count of scratch tapes in the library. And the third line
tells me how many empty slots I have in the library, which can be very
helpful. Please note in the third line you would change the number '19'
to the number of slots your library holds. Also if you have more than
one library you might add "where library_name='lib'" to the commands.
--
Regards,
Mark D. Rodriguez
President MDR Consulting, Inc.
===============================================================================
MDR Consulting
The very best in Technical Training and Consulting.
IBM Advanced Business Partner
SAIR Linux and GNU Authorized Center for Education
IBM Certified Advanced Technical Expert, CATE
AIX Support and Performance Tuning, RS6000 SP, TSM/ADSM and Linux
Red Hat Certified Engineer, RHCE
===============================================================================
Joni Moyer wrote:
Hello Everyone!
I am trying to get a count of how many scratch tapes I have in NASLIB. I
issue the following command, but it comes up with 0. Would you happen to
know what I am doing wrong? Thanks!
select count(*) as "NAS Scratch Tape Count" from libvolumes where
library_name='NASLIB' and status='SCRATCH'
Library Name Volume Name Status Owner Last Use Home E
Device
lement Type
------------ ----------- ---------- ---------- --------- -------
------
NASLIB N00000 Scratch
NASLIB N00001 Scratch
NASLIB N00002 Scratch
NASLIB N00003 Scratch
NASLIB N00004 Scratch
NASLIB N00005 Scratch
NASLIB N00006 Scratch
NASLIB N00007 Scratch
NASLIB N00010 Private Data
NASLIB N00017 Scratch
NASLIB N00018 Scratch
NASLIB N00019 Scratch
NASLIB N00020 Scratch
NASLIB N00021 Scratch
NASLIB N00022 Scratch
NASLIB N00023 Scratch
NASLIB N00024 Scratch
NASLIB N00025 Scratch
NASLIB N00026 Scratch
NASLIB N00027 Scratch
********************************
Joni Moyer
Highmark
Storage Systems
Work:(717)302-6603
Fax:(717)302-5974
joni.moyer AT highmark DOT com
********************************
|
|
|