Policy thresholds

You can use policy rules to define several different types of thresholds. When multiple policy rules with the same threshold are deployed, the order in which the rules are triggered is message action rules first, then event action rules, and finally abend action rules.

Supported rule type details

Table 1. Supported rule type details
Rule Type  1  Rule Item  2  Operator  3  Unit  4 

Database request

SQL command

Greater Than

""
requests
K
thousand requests

File request

Delete
Read
Read next
Read previous
Read update
Rewrite
Start browse
Write

Greater Than

""
requests
K
thousand requests

Program request

Link

Greater Than

""
requests
K
thousand requests

Storage

24-bit Task storage
31-bit Task storage
64-bit Task storage
24-bit Shared storage
31-bit Shared storage
64-bit Shared storage

Greater Than

B
bytes
K
kilobytes
M
megabytes
G
gigabytes

Storage request

24-bit Task storage request
31-bit Task storage request
64-bit Task storage request
24-bit Shared storage request
31-bit Shared storage request
64-bit Shared storage request

Greater Than

""
requests
K
thousand requests

Time

CPU limit

Greater Than

O
microseconds
M
milliseconds
S
seconds
Note: When you select a unit and specify a value for the threshold in your policy rule, be aware that the granularity decreases as the size of the unit increases. If you find you are unable to specify a high enough value at the higher unit, you might be able to specify the appropriate value by using a lower (smaller) unit. For example, if you are creating a storage type policy rule, and you are unable to set your threshold by using "G" (Gigabytes) as your unit, you might be able to set your threshold by using "M" (Megabytes) as your unit, and entering a Megabyte equivalent value in the Value field in the Policy wizard.

Examples

This example lists the XML for a storage and filerequest policy. The policy issues message DFHMP3001 when a task allocates more than 1024 bytes of 24-bit task storage, or when a task performs more than 50 file reads.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<policy:policy xmlns:policy="http://www.ibm.com/xmlns/prod/cics/managedplatform/policy" policySchemaRelease="0" policySchemaVersion="1">
   <description>Example platform policy to monitor task storage and file read counts</description>
   <userTag>exmp_1</userTag> thru <userTag>exmp_3</userTag>
   <rule type="storage" 1 > 
      <name>TooMuch24BitStorage</name> 
      <description>Issue DFHMP3001 msg when a task allocate more than 1024 bytes of 24 bit task storage</description>      
      <storageUsedCondition item="task24" 2  operator="GT" 3  value="1" unit="K" 4 />      
      <action>
         <message/>  
      </action> 
   </rule>
   <rule type="filerequest" 1 > 
      <name>TooManyReads</name> 
      <description>Issue DFHMP3001 msg when a task does more than 50 reads</description>      
      <fileRequestCondition item="read" 2  operator="GT" 3  value="50" unit="" 4 />
      <action>
         <message/>  
      </action> 
   </rule> 
</policy:policy>
This example lists the XML for a filerequest policy that abends a task. The policy abends the task with default abend code AMPB if the task performs more than 10000 file reads, or abends the task with user-specified abend code CFI1 if the task performs more than 5000 file writes. Along with the abend, message DFHMP3002 is issued.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<policy:policy xmlns:policy="http://www.ibm.com/xmlns/prod/cics/managedplatform/policy" policySchemaRelease="0" policySchemaVersion="1">
   <description>Policy to monitor the number of file reads</description>
   <userTag>fcpol_1</userTag> 
   <rule type="filerequest" 1 > 
      <name>File_Reads</name> 
      <description>Abend the task if the file read limit exceeded</description>      
      <fileRequestCondition item="read" 2  operator="GT" 3  value="10" unit="K" 4 />      
      <action>
         <abend/>  
      </action> 
   </rule>
   <rule type="filerequest" 1 > 
      <name>File Write</name> 
      <description>Abend the task with specified abend code CFI1 if the file write limit exceeded</description>      
      <fileRequestCondition item="write" 2  operator="GT" 3  value="5" unit="K" 4 />
      <action>
         <abend abendCode="CFI1"/>  
      </action> 
   </rule> 
</policy:policy>
This example lists the XML for a filerequest policy that issues events. The policy issues an event to an event adapter named adapterB if the task performs more than 500 file writes, and issues an event to an event adapter set named adaSetA if the task performs more than 100 file reads.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<policy:policy xmlns:policy="http://www.ibm.com/xmlns/prod/cics/managedplatform/policy" policySchemaRelease="0" policySchemaVersion="1">
   <description>Policy to monitor the number of file reads</description>
   <userTag>fcpol_1</userTag> 
   <rule type="filerequest" 1 > 
      <name>File Write</name> 
      <description>The file write limitation policy</description>      
      <fileRequestCondition item="write" 2  operator="GT" 3  value="500" unit="" 4 />      
      <action>
         <event>  
            <eventAdapterName>adapterB</eventAdapterName> 
         </event>  
      </action> 
   </rule>
   <rule type="filerequest" 1 > 
      <name>File_Reads</name> 
      <description>File read limitation policy</description>      
      <fileRequestCondition item="read" 2  operator="GT" 3  value="100" unit="" 4 />
      <action>
         <event>  
            <eventAdapterSetName>adaSetA</eventAdapterSetName> 
         </event>  
      </action> 
   </rule> 
</policy:policy>
For more information about how the rule type details shown in Table 1 map to XML parameters and values, see Policy XML element name and attribute values.