ADSM-L

Re: [ADSM-L] Help with tsm script

2011-06-07 10:52:03
Subject: Re: [ADSM-L] Help with tsm script
From: "Vandeventer, Harold [BS]" <Harold.Vandeventer AT DA.KS DOT GOV>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 7 Jun 2011 09:45:03 -0500
Do you have the document "Changes to the SELECT command" from 
http://publib.boulder.ibm.com/infocenter/tsminfo/v6r2/index.jsp?topic=/com.ibm.itsm.srv.upgrd.doc/r_srv_upgrd_cmd_select.html?

The last section is Data types for arithmetic operations.  Compare your 
"cast(sum(cast((est_capacity_mb / 1024 * (pct_utilized / 100))" string to last 
example in the article.

The example has two "as decimal" strings; you might need an "as decimal" spec 
on the "pct_utilized /100"?

------------------------------------------------
Harold Vandeventer
Systems Programmer
State of Kansas - DISC
Harold.Vandeventer AT da.ks DOT gov
(785) 296-0631

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Lee, Gary D.
Sent: Tuesday, June 07, 2011 9:24 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [ADSM-L] Help with tsm script

I have a script which under tsm 5.5.4 server gives a report of

The storage pool name, count ov reclaimable volumes, and reclaimable space for 
the specified percentage.
You execute as follows:

Run reclaim-check 55

Under tsm 6.2.2, I get an arithmetic exception sqlstate 22003.
I don't see the problem.

Script follows:

 SELECT distinct stgpool_name as "Pool", - 
    count(volume_name) as "No. Volumes", - 
    cast(sum(cast((est_capacity_mb / 1024 *  - 
    (pct_utilized / 100)) - 
    as decimal(9,3))) as decimal(9,3)) - 
    as "GB Reclaimable" - 
 FROM   volumes - 
 WHERE  pct_reclaim>$1 - 
 GROUP BY stgpool_name 


Any ideas?
The error message gives no help as to what part of the expression gives the 
exception.
Thanks for any help you can give.


Gary Lee
Senior System Programmer
Ball State University
phone: 765-285-1310

 

<Prev in Thread] Current Thread [Next in Thread>