Question about GOA script
search cancel

Question about GOA script

book

Article ID: 204609

calendar_today

Updated On:

Products

Vantage Storage Resource Manager GRAPHICAL MANAGEMENT INTERFACE

Issue/Introduction

We are attempting to create a Phased GOA script to submit a job based on the utilization of two different pools. The two pools in the example script below are named ABDB2MN and ABDB2MX. We want the script to take action if ABDB2MN is greater than 10% used and if ABDB2MX is less than 40% used. On our test system both conditions are true. ABDB2MN is 18% used and ABDB2MX is 0% used. When we fire off this script it does not submit the job like we are expecting it to. Is it not possible to use AND logic in the SET FILTER statement?

 

 <EVENT_PROCEDURE>                                              
 SELECT_OBJ=POOLS                                               
 SET_LASTINTVL                                                  
 SET_FILTER=(POOLNAME=ABDB2M/)                                  
 APPLY_PHASEFILTER                                              
 EXECUTE                                                        
 SET_STATE=OK                                                   
 USE_MONITOR_OBJ                                                
 SET_FILTER=(POOLNAME INCL ABDB2MN AND POOLUPCT>10) AND         
            (POOLNAME INCL SABDB2MX AND POOLUPCT<40)             
 EXECUTE                                                        
 SET_STATE=VIOLATION                                            
 SUBSTITUTE_JCL=DSN=SYS.JCL,MEMBER=DASDABX1                
 SUBMIT_PHASE_JOB                                               

Environment

Release : 14.0

Component : CA Vantage Storage Resource Manager

Resolution

The filter - as you have defined it - will never select any record. This can be seen at a glance when we remove the parentheses from it - which are redundant in it - and rearrange the conditions:

POOLNAME INCL ABDB2MN AND POOLNAME INCL ABDB2MX AND POOLUPCT >10 AND POOLUPCT <40

It is clear that the first and second conditions are mutually exclusive and therefore cannot apply at the same time.

I recommend changing the filter as follows:

SET_FILTER = (POOLNAME INCL ABDB2MN AND POOLUPCT >10) OR (POOLNAME INCL ABDB2MX AND POOLUPCT <40)

And continue the script:

EXECUTE

IF RECORDS EQ = 2

.....

You can also generate a script in this form using Automation Script Builder. After entering the filter - see above - just select "Equal to" in the "Conditions for Actions" step and enter 2 as the "number of records".