/* File Name : hc/db-extent-chk
Description : checks file size of fixed DB extents (found in list# var)
Date Written : 05/29/03 by MWM
Date Modified: 01/23/04 by MWM - allow for more than 1 extent
*/
def var i as int.
def var name# as char.
def var list# as char init "controls_7.d2,controls_8.d3".
def var file-size# as int.
repeat i = 1 to num-entries(list#):
name# = entry(i,list#).
/* Start input from the "fs" command & skip the first line */
unix silent value ("ls -l /db-location/" + name# + " > " + name# + ".lst").
input from value (name# + ".lst").
import ^ ^ ^ ^ file-size#.
input close.
/* use this for testing
if file-size# > 100000 then unix silent value
("mail -s 'DB extent size warning!'
user.name@domain.com"
+ " < " + name# + ".lst").
*/
if file-size# > 1535000000 then unix silent value
("mail -s 'DB extent size warning!'
user.name@domain.com < "
+ name# + ".lst").
end.