Filter parameter syntax

The filter parameter is used to limit the entries returned for a particular query. You specify a filter by listing a set of conditions. These conditions specify a comparison between two values; a subentry value in the CSI is compared with a fixed value specified in the condition.

Multiple filter conditions may be specified using the operators, & (logical AND) and | (logical OR). Parentheses may be used to group search conditions to ensure a desired evaluation sequence for the filter. The parentheses, when used, may be preceded by one or more blanks and also may be followed by one or more blanks.

When a subentry name represents a list of values, such as PRE, which is a list of all the prerequisite SYSMODs, each value in the list from the CSI is compared to the fixed value. If any match, the condition is evaluated as true.

These subentry types may be specified in the filter parameter only with the = or != operators and a null value (for example, ASMIN='' or LEPARM!=''):

The fixed value must be enclosed within single quotation marks. Any set of characters may be used in the fixed value. If the fixed value is shorter than the subentry value, GIMAPI left-justifies the fixed value and pads it with blanks before doing the comparison.

Any apostrophes specified as part of a DESCRIPTION, VENDOR, or URL subentry (excluding delimiters) must be doubled. Double apostrophes count as two characters in the filter length.

Blanks may be freely used to separate the subentry, operator, and fixed value.

The values of some subentry types are lists of composite values. An example of this is the CIFREQ parameter whose value is causer,requisite. The fixed value for conditions containing these types of subentries must match the format of the output provided by the QUERY command. For example:
  CIFREQ='PTF0001,PTF0002'

Refer to Valid subentry types for the format of each composite subentry type.

A null value for a subentry is specified by using two single quotation marks with no blanks between them(''). This can be used to find all entries whose value is not blank, for example, PATH!=''.

The operators that can be used to compare a subentry value to a fixed value, or to join a set of conditions together, are:
Operator
Function
=
Equal to
!=
Not equal to
<
Less than
<=
Less than or equal to
>
Greater than
>=
Greater than or equal to
|
Logical OR, at least one of two conditions are true
&
Logical AND, both conditions must be true

Subentry names that may appear to the left of operators are the subentries defined in Valid subentry types. Potential values for each subentry can be found in SMP/E data set entries. When a subentry is an indicator, such as PROTECT for the DDDEF entry, its value is either YES or NO.

A requested subentry may not have a value for a particular entry. This value is considered null. This may occur for one of the following reasons: An example of the latter case is a request for the SYSLIB subentry with the SYSMOD entry type. SYSMOD entries do not contain SYSLIB subentries, causing a request for such a value to always return a null value.

When the not equal sign is used with some value within a filter, for example SYSLIB!='MACLIB', the case where no data is found for the subentry is considered a match, because "MACLIB" does not equal a null value. Therefore, if this filter is used when requesting the SYSMOD entry type, all the SYSMODs in the selected zones are returned. To exclude entries having no value, write the filter as (SYSLIB!='MACLIB' & SYSLIB!='').

The >, >=, < and <= operators can be used only with the subentry types that have date, time, or return code values, which are:

The >, >=, < and <= operators have no meaning when applied to a subentry that has a null value. GIMAPI will always resolve such comparisons to false.

A date fixed value must use the format yyddd. It must be five numeric characters. For example, specify 01365 to represent December 31, 2001.

A time fixed value must use the format hh:mm:ss, where hh is a two-digit decimal number in the range 00 through 23, and mm and ss are both two-digit decimal numbers in the range 00 through 59. (That is, in 24-hour clock format.)

The filter parameter is made up of a combination of these parts:
The following list indicates for each part, what other part or parts can follow it. Any other sequence of parts is considered a syntax error.
Filter part
Can be followed by
Subentry
Operator
Operator
Fixed value
Fixed value
Conjunction, Right parenthesis, End of filter
Conjunction
Subentry Left parenthesis
Left parenthesis
Subentry, Left parenthesis
Right parenthesis
Conjunction, Right parenthesis, End of filter