How to build a filter expression

A filter expression is a character string that defines logical expressions to be used in filtering resource table records.

A filter expression can be made up of one or more attribute expressions in the form:
Read syntax diagramSkip visual syntax diagram
Filter Expression

>>-| logic_expr |--.-------------------------------------------><

logic_expr

   .-AND/OR----------------------------.   
   V                                   |   
|----+-----+--+-| attr_expr |--------+-+------------------------|
     '-NOT-'  '-(--| logic_expr |--)-'     

attr_expr

|--attr--oper--value--------------------------------------------|

where:
attr
Is the name of an attribute in the resource table.

You can name the same attribute more than once in a filter expression.

Note: In a filter expression you cannot specify the EYU_CICSREL attribute, or attributes with a maximum length over 256 bytes.
oper
Is one of the following comparison operators:
<
Less than
<=
Less than or equal to
=
Equal to
>=
Greater than or equal to
>
Greater than
¬=
Not equal to
Important: Start of changeUse less than (<) or greater than (>) operators in your CRITERIA expression instead of equal (=), when you are working with store clock based fields. If you are directly using the CICSPlex® SM API, or the CMCI and require to select records that are based on a specific store clock value, a compound CRITERIA expression can be used. For example, "RESPTIME>='0000:00:00.008351' AND RESPTIME<'0000:00:00.008352'.".End of change
value
Is the value for which the attribute is being tested. The value must be a valid one for the resource table attribute.
Generic values
If the attribute accepts character data, this value can be a generic. Generic values can contain:
  • An asterisk (*), to represent any number of characters, including zero. The asterisk must be the last or only character in the specified value. For example:
      TRANID=PAY*.
  • A plus sign (+), to represent a single character. A + can appear in one or more positions in the specified value. For example:
      TRANID=P++9.
Note:
  1. Generic value checking is applied only to the filter value. For example, a filter value of USERID=S* returns resource table records that have a user ID starting with S. However, a filter value of USERID=SMITH does not return resource table records that appear to contain generic characters, for example, those with a user ID of S*.
  2. For hexadecimal data types, the data must be converted to hexadecimal before appending the asterisk (*) for the generic search. The plus sign (+) is not supported for hexadecimal data types.
  3. The Web User Interface does not support the use of embedded generic characters in attribute filters in WLM active views such as EYUSTARTWLMATAFF. A single asterisks (*) may be used to request all values.
Imbedded blanks or special characters
If the value contains imbedded blanks or special characters (such as periods, commas, or equal signs), the entire value string must be enclosed in single quotes. For example:
  TERMID='Z AB'.
To include a single quote or apostrophe in a value, you must repeat the character, like this:
  DESCRIPTION='October''s Payroll'.
Note: Be sure to consider the quoting conventions of your programming language when using single quotes in a CICSPlex SM value string.
Hexadecimal data
If the attribute has a datatype of HEX the value must be in hexadecimal notation.
For example, the NAME attribute of the REQID resource table is a HEX datatype. To specify a name equal to 01234567 the value, using hexadecimal notation, would be
  NAME=F0F1F2F3F4F5F6F7.
AND/OR
Combines attribute expressions into compound logic expressions using the logical operators AND and OR, like this:
  attr_expr AND attr_expr.
Filter expressions are evaluated from left to right. You can use parentheses to vary the meaning of a filter expression. For example, this expression:
  attr_expr AND (attr_expr OR attr_expr).
has a different meaning than this one:
  (attr_expr AND attr_expr) OR attr_expr.
NOT
Negates one or more attribute expressions.
You can negate a single attribute expression, like this:
  NOT attr_expr.
You can also negate multiple attribute expressions or even a whole filter expression, like this:
  NOT (attr_expr OR attr_expr).
Note that you must place parentheses around the attribute expressions (or the filter expression) to be negated.
Note: A filter expression must be followed by either blank spaces or null characters to the end of the specified buffer. That is, the buffer length you specify (using the LENGTH option) should not include any data other than a filter expression.
For example, the following is a simple filter expression that you could use to select LOCTRAN objects representing local transactions that are enabled and have a storage violation count greater than zero:
  STATUS=ENABLED AND STGVCNT>0.
You can build more complex filter expressions to select objects with a very specific combination of attributes. For example, to select LOCTRAN objects that: you could specify a filter expression like this:
  (TRANID=P* AND PROGRAM=PAY* AND STATUS=ENABLED) AND
  ((USECOUNT>0 AND STGVCNT>0) OR NOT RESTARTCNT=0).

Note that the RESTARTCNT attribute in this example could also have been specified with the greater than operator instead of the NOT operator.



eyup1a0.html | Timestamp icon Last updated: Thursday, 27 June 2019