<pre>
-- Author: From: "Mcmahon, Stephen J, BGM" <smcmahon@ATT.COM>
-- posted to Sybase-L 10/29/98

select master..sysdevices.name as device_name,
round((((master..sysdevices.high +1) - master..sysdevices.low)/512.0),2) as
device_size,
          sum(master..sysusages.size/512.0) as space_used,
          round(((((master..sysdevices.high +1) - master..sysdevices.low) -
sum(master..sysusages.size))/512.0),2) as space_left,

          master..sysdevices.phyname as file_name
     from master..sysdevices, master..sysusages
 where master..sysusages.vstart between  master..sysdevices.low and master..sysd
evices.high
             and master..sysdevices.status != 16

            group by master..sysdevices.name
   having   ((((master..sysdevices.high +1) - master..sysdevices.low) -
sum(master..sysusages.size))/512.0) > 0
       order by space_left desc 
