ADSM-L

Re: Server scripts with decisions based on values from a select statement.

2002-08-06 08:52:50
Subject: Re: Server scripts with decisions based on values from a select statement.
From: Bill Boyer <bill.boyer AT VERIZON DOT NET>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 6 Aug 2002 08:50:11 -0400
You can't get the results of the SELECT into the script, but you can limit
the SELECT to only return something when the cache hit is < 98.5 and check
the return code...

SELECT * FROM DB WHERE CACHE_HIT_PCT < 98.5
IF (RC_NOTFOUND) GOTO DBOK
ISSUE MESSAGE I "*** INCREASE THE BUFPOOLSIZE! ***
DBOK:
EXIT

If the cache hit is >= 98.5, then you'll see message "ANR2034E SELECT: No
match found using this criteria."


Check out the return code listings in the admin guide seciont "Using Logic
Flow Statements in a Script" and the Admin Reference for list of valid
return codes and severity levels.

Bill Boyer
DSS, Inc.

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU]On Behalf Of
Wayne Gorton
Sent: Tuesday, August 06, 2002 3:52 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Server scripts with decisions based on values from a select
statement.


Howdy,
Is there a way to issue a select statement in a scripts and based on what is
returned perform a different action.
My idea is to issue the following select
"select CACHE_HIT_PCT from db" if the value is below 98.5 then issue message
i "DB cache hit rate too low. Bump up bufpoolsize"
If this is possible in a script there are a lot of other funky things I'd
like to do.
P.S. I have done it via a ksh and perl but would like to avoid it.


Share and Enjoy

Wayne Gorton
Innovative Business Knowledge (IBK) P/L
PH:    +61 2 9614 1604
FAX: +61 3 9820 2840
MOB: +61 417 427 441
Email: waynneg AT ibk.com DOT au


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 24-Jul-02

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