Building the QUERY parameters data structure

The QUERY command parameter list must include a pointer to a data structure (parmptr) that defines the query to be processed. This data structure, in turn, contains pointers to character strings that specify from where data is to be retrieved (that is, which CSI, zones, and entry types) and, optionally, a list of subentries and a filter, which allow you to specify conditions that will be used to determine which entries are retrieved.

The following parameters are part of the structure pointed to by the parmptr parameter of the QUERY command. All the parameters are required except the subentry and filter parameters.
csi
Input is accepted in mixed case. A character string that specifies the name of the global CSI to be searched by the QUERY command. The DDNAME used when allocating the data set is SMPCSI.

Input is accepted in mixed case. It is folded to uppercase when the command is processed.

csilen
A decimal number specifying the size of the character string containing the csi parameter. This value cannot be greater than 44.

A zero (0) value indicates that the calling program has already allocated a global CSI data set as the SMPCSI DDNAME. That allocation is used and the csi parameter is ignored.

zone
A character string that specifies the zones from which data is to be retrieved. You may enter one or more specific zone names separated by commas or blanks, or any of these values:
GLOBAL
Use the global zone
ALLTZONES
Use all target zones
ALLDZONES
Use all DLIB zones
*
Use all zones defined in the GLOBAL zone index

Except for the asterisk (*), these values can be used together and with specific zone names, provided that all values are separated by commas or blanks. The asterisk (*) must be used alone.

For example, these specifications are valid:
  GLOBAL, ALLTZONES
  ALLTZONES, ALLDZONES
  ALLTZONES, MY1DLIB, MY2DLIB
  ALLTZONES MY1DLIB, MY2DLIB
whereas this is not valid:
  GLOBAL, *, ALLTZONES

A zone can be specified only once in the zone parameter. A specific DLIB zone name along with the ALLDZONES keyword or a specific target zone name along with the ALLTZONES keyword does not cause a message to be issued. However, processing for the duplicated zone names will be done only once.

Spaces can be used freely between values and commas.

Input is accepted in mixed case. It is folded to uppercase when the command is processed.

The specific zone name can be a ZONESET name. The command will first check whether the name is a ZONESET. If not, it will check the ZONEINDEX.

zonelen
A decimal number specifying the size of the character string containing the zone parameter.
entry
A character string that indicates the entry types from the specified zones to be searched. You can specify one or more entries, separated by commas or blanks, or you can specify an asterisk (*) to indicate that all entries are to be searched. If an asterisk is used, no other values may be specified.

An entry can be specified only once in the entry parameter.

Spaces can be used freely between entry names and commas.

Input is accepted in mixed case. It is folded to uppercase when the command is processed.

The entry types specified must be valid CSI entry types. Refer to Valid entry types for a list of the valid types.

entrylen
A decimal number specifying the size of the character string containing the entry parameter.
subentry
Each CSI entry has a set of subentries associated with it. The subentry parameter is a pointer to a character string used to indicate the subentries for which data is retrieved. Several subentries can be specified separated by commas or blanks, or you can specify an asterisk (*) to indicate that all subentries are to be searched. If an asterisk is used, no other values may be specified.

A subentry can be specified only once in the subentry parameter.

Spaces can be used freely between subentry names and commas.

Input is accepted in mixed case. It is folded to uppercase when the command is processed.

Note: The entry parameter allows multiple entries to be specified. It may be that a subentry to be returned does not apply to all the specified entries. In this case, the subentry is simply ignored for a particular entry to which it does not apply.

Refer to Valid subentry types for more details.

subentrylen
A decimal number specifying the size of the character string containing the subentry parameter.
filter
A character string that specifies the set of conditions with which to limit the set of entries being retrieved. A condition is in the form
  subentry  operator  'value'

For example, FMID = 'HP10230' or INSTALLDATE >= '07203'.

Input is accepted in mixed case. The subentry types are folded to uppercase when the command is processed. The fixed values are not changed.

Filter is an optional parameter. When no filtering is desired, set the length field (filterlen) to zero (0).

Refer to Filter parameter syntax for a detailed description of the syntax of the filter parameter.

filterlen
A decimal number specifying the size of the character string containing the filter parameter.