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  Value  5 

Database request

SQL command

Greater Than

""
requests
K
thousand requests
""
0 - 4294967295
K
0 - 4294967

File request

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

Greater Than

""
requests
K
thousand requests
""
0 - 4294967295
K
0 - 4294967

These value ranges for requests or thousand requests apply to all File request policy rule items.

Program request

LINK command

Note: INVOKE APPLICATION commands are also included in the count, but are not a separate policy item.

Greater Than

""
requests
K
thousand requests
""
0 - 4294967295
K
0 - 4294967

Start request

START command

Greater Than

""
requests
K
thousand requests
""
0 - 4294967295
K
0 - 4294967

Storage

24-bit Task storage
24-bit Shared storage

31-bit Task storage
31-bit Shared storage

64-bit Task storage
64-bit Shared storage

Greater Than

B
bytes
K
kilobytes
M
megabytes
G
gigabytes

24-bit rule items:

B
0 - 16777215
K
0 - 16383
M
0 - 15
G
0


31-bit rule items:

B
0 - 2147483647
K
0 - 2097151
M
0 - 2047
G
0 - 1


64-bit rule items:

B
0 - 4294967295
K
0 - 4294967295
M
0 - 4294967295
G
0 - 4294967295

Storage request

24-bit Task storage request
24-bit Shared storage request

31-bit Task storage request
31-bit Shared storage request

64-bit Task storage request
64-bit Shared storage request

Greater Than

""
requests
K
thousand requests
""
0 - 4294967295
K
0 - 4294967

These value ranges for requests or thousand requests apply to all Storage request policy rule items.

Syncpoint request

SYNCPOINT command

Greater Than

""
requests
K
thousand requests
""
0 - 4294967295
K
0 - 4294967

TD Queue request

READQ TD command
WRITEQ TD command

Greater Than

""
requests
K
thousand requests
""
0 - 4294967295
K
0 - 4294967

These value ranges for requests or thousand requests apply to all TD Queue request policy rule items.

Time

CPU time
Elapsed time

Greater Than

O
microseconds
M
milliseconds
S
seconds
O
0 - 4294967295
M
0 - 86400000
S
0 - 86400 (a value of 86400 equates to 24 hours)

TS Queue bytes

WRITEQ TS command
WRITEQ TS auxiliary command
WRITEQ TS main command

Note:
  • The WRITEQ policy item is used to set a threshold for the amount of data that is written to all TSQs combined. The other policy items are used to set a threshold for a specific type of TSQ.
  • Data that is written by both WRITE and REWRITE requests count towards the total, and REWRITE requests are treated as WRITE operations, in that the count is incremented by the total size of the REWRITE, and not the delta between the original WRITE and REWRITE.
  • Data is counted only if the WRITEQ is performed successfully.

Greater Than

B
bytes
K
kilobytes
M
megabytes
G
gigabytes
B
0 - 4294967295
K
0 - 4194303
M
0 - 4095
G
0 - 3

All TS Queue bytes policy rule items have the same value ranges.

TS Queue request

READQ TS command
WRITEQ TS command
WRITEQ TS auxiliary command
WRITEQ TS main command

Note: The READQ and WRITEQ policy items are used to set a threshold for the total number READ or WRITE requests to the auxiliary and main TSQs combined. The other WRITEQ policy items are used to set a threshold for the number WRITE requests to a specific type of TSQ.

Greater Than

""
requests
K
thousand requests
""
0 - 4294967295
K
0 - 4294967

These value ranges for requests or thousand requests apply to all TS Queue request policy rule items.

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. However, if you find you are unable to specify a high enough value at the lower unit, you might be able to specify an appropriate value by using a higher (greater) unit. For example, if you are creating a storage type policy rule, and want to set a threshold for 64-bit Shared storage greater than 4294967295 bytes, you cannot use "B" (Bytes) as your unit, but you might be able to set your threshold by using "K" (Kilobytes) as your unit, and entering an appropriate Kilobyte value in the Value field in the Policy wizard.
Important: You can use CICS® monitoring data to set a policy threshold, but be aware that the number of requests that are counted by CICS monitoring and the requests that are counted by CICS policy might differ. This is because policy counts only EXEC CICS API requests, whereas monitoring also includes any internal requests. Therefore, any requests that do not go through the EXEC CICS layer are counted by CICS monitoring, but are not included in the policy count. To use the policy to count WRITEQ TD requests as an example, if a user task issues an EXEC CICS SPI request to change the status of a CICS resource, message DFHAP1900 is written to the transient data queue CADS; this request is counted in CICS monitoring data but is not included in the policy count.

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" 5  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" 5  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" 5  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" 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" 5  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" 5  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.