It's a big hammer, but this is the only thing I've found for this type of thing. It could be made into a separate macro and a series of calls could be made for each percentage level to test.
/* Display message for DB utilization */ 90: select pct_utilized from db where pct_utilized > 90 if (rc_notfound) goto 80 issue message I "REMCO001 datbase for server is 90 percent full" goto exit 80: select pct_utilized from db where pct_utilized > 80 if (rc_notfound) goto 70 issue message I "REMCO001 datbase for server is 80 percent full" goto exit 70: select pct_utilized from db where pct_utilized > 70 if (rc_notfound) goto ok issue message I "REMCO001 datbase for server is 70 percent full" goto exit ok: issue message I "REMCO001 datbase for server is less than 70 percent full" exit: Exit Bob. -----Original Message----- From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf Of Remco Post Sent: Tuesday, August 26, 2008 11:18 AM To: ADSM-L@VM.MARIST.EDU Subject: Re: [ADSM-L] select and script On Aug 26, 2008, at 17:17 , Kauffman, Tom wrote: > It would be nice -- maybe after the DB2 conversion we'll get a genuine > TSM server-side command language and scripting facility. > > Until then I do a lot of admin work from the outside with a mix of > perl and shell scripts. > Unfortunately, for most TSM admins it's much easier to distribute a server script to all TSM servers than to run a set of scripts against all server instances on all servers (or even get the scripts there and be able run them in cron). As for TSM 6.1, I'd expect nothing more than current 5.5 functionality WRT the scripting engine. > TK > > -----Original Message----- > From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf > Of Remco Post > Sent: Tuesday, August 26, 2008 11:14 AM > To: ADSM-L@VM.MARIST.EDU > Subject: Re: select and script > > On 26 aug 2008, at 17:04, Kauffman, Tom wrote: > >> You mean something like this? >> > > Yes, something like that, but entirely within TSM, so a real TSM > server script ;-) > >> #!/bin/sh >> >> DBUTIL=`dsm_cmd.pl "select pct_utilized from db" | tail -2` echo >> "Database is $DBUTIL% full\n" >> >> exit 0 >> >> columbia:-:/home/kauffmant > ./dbutil.sh >> Database is 67.0% full >> >> >> Just a two-minute hack, could use a bit of cleanup. >> >> Dsm_cmd.pl is part off the adsm.pm perl interface to adsm found >> here: http://www.io.com/~ocrow/ADSM/Adsm.html >> >> Tom Kauffman >> >> -----Original Message----- >> From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On Behalf >> Of Remco Post >> Sent: Tuesday, August 26, 2008 9:45 AM >> To: ADSM-L@VM.MARIST.EDU >> Subject: select and script >> >> Hi all, >> >> I'm convinced that it should be possible in TSM to do something like >> the following in a TSM server script: >> >> select into %1 pct_utilized from db >> issue message I REMCO001 datbase for server is %1 percent full >> >> But I can't anything anywhere on the web or the TSM manuals to point >> me in the right direction. Am I mistaking, can't this be done? Or am >> I not looking in the right places? >> >> -- >> Met vriendelijke groeten/Kind regards, >> >> Remco Post, PLCS >> +31624821622 > > -- > Met vriendelijke groeten/Kind regards, > > Remco Post, PLCS > +31624821622 -- Met vriendelijke groeten, Remco Post [EMAIL PROTECTED] This electronic transmission and any documents accompanying this electronic transmission contain confidential information belonging to the sender. This information may be legally privileged. The information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or the taking of any action in reliance on or regarding the contents of this electronically transmitted information is strictly prohibited.