Default language.

Edit Search Criteria Dialog Box


The Edit Search Criteria dialog box is used to build search criteria when performing an advanced search, and to edit or duplicate conditions.

To use the Edit Search Criteria dialog box

  1. Do either of the following to build selection criteria for performing the search. Selection criteria consists of a location, length, operator, data type, and value.
    • Click Select Field to open the Field Selection dialog box to select a layout dataset from which to get location and length for a field based on a COBOL or PL/I record layout.
    • Do the following on the Edit Search Criteria dialog box:
      • In the Location field, enter the location in which to start to search.
      • In the Length field, enter the length of the field being searched for. This field is only enabled when contains is chosen from the operator list. It is also enabled when searching for binary numeric data using the Binary data type. If a length is not specified with the contains operator, it implies to scan from the specified location to the end of the record. If a length is not specified for Binary data type, a length of 4 is used.
      • From the Data type list, select the type of data for which to search. Supported data types are listed below.
      • From the Operator list, select the operator to be used for the search. Click F1 or ? to access the online user guide for detailed information on specifying search criteria. Operators are described below.
      • In the Value field, enter the value for which to search. To enter multiple values, separate the values with commas and select the Use comma to separate values check box. Note that if space characters are used, they are considered part of the value. (For example, enter a,b,c and select the check box to search for a OR b OR c.) To do a literal search for a value that includes commas, clear the check box. (For example, enter a, b, c and clear the check box to search for the string "a,b,c".) Values are described below.

        Warning

        Important

        For non-character data types, the Use comma to separate values check box is ignored, therefore this search condition is always a search of multiple values (OR) when a comma is used and multiple values are entered.

  2. Click OK. The selection criteria is entered on the Search dialog box.

Supported data types

Supported data types include the following:

  • Any Case Text (default): The values entered are used to compare with the data at the specified location and will match any case (upper, lower, or mixed) of the entered strings.
  • Exact Case Text: The values entered are used to compare with the data at the specified location and will match only the exact case of the entered strings.
  • Hex: The value is expected to be one or more even pairs of hex digits 0-9, A-F. The values entered are used to compare with the data at the specified location and will match the hex values of the data in the record.
  • Packed: Typically the value entered is a signed or unsigned decimal integer. It is used to compare with the data at the location in packed format. If the value entered is unsigned or positive, it will match a positive or an unsigned packed number at the specified location. If negative, it will only match a negative packed number at the specified location. 

    Error
    Warning

    Only use this data type to compare values (equal, not equal, greater, greater or equal, less, less or equal, between, not between) when certain there is valid packed data at the specified field location in every record of the file(s) being searched. For operators "is a valid field" and "is not a valid field", do not code a value, and there is no requirement for valid packed data at the specified field location.

  • Binary: Similar to the Packed data type, the value entered is a signed or unsigned decimal integer. A length (1, 2, 4, or 8) is required with this data type. If a length is not specified a length of 4 is used. The value entered is converted to a binary value and compared to the binary data at the specified location. Values may be signed or unsigned decimal numbers within the range allowed for the length. For example, with a length of 2 you may look for values in the range of (signed) -32767 to +32767 or (unsigned) 0 to 65535.
  • Bit Mask: This data type tests for individual bits in one byte of data at the specified location. The value specified is a pair of hex digits 0-9,A-F. Example FF is a binary mask equivalent to 11111111. Special operators are provided when using this data type: Equal (all ones, all 1s in the mask are on in the data), Not Equal (not ones, all 1s in the mask are off in the data), Are Mixed ones and zeros (Some 1s, but not all, in the mask are on in the data), Not ones (Not all 1s in the mask are on in the data). Mixed and Not ones operators are only used when the bit mask contains more than one 1. They don't have any meaning if there is only 1 bit to test. Equal is the same as Mixed and Not Equal is the same as Not ones when the mask has only one bit.

Operators

  1. Operators are dependent on data type as follows: 

    Warning

    Important

    Comparisons are based on the EBCDIC collating sequence.


    • is equal to: Selects all records that contain the specified value in this field.
    • is not equal to: Selects all records that do not contain the specified value in this field.
    • is greater than: Selects all records with contents that appear alphabetically after the specified value in this field. The specified value is not selected.
    • is less than: Selects all records with contents that appear alphabetically before the specified value in this field. The specified value is not selected.
    • is greater than or equal to: Selects all records with contents that include the specified value and appear alphabetically after the specified value in this field.
    • is less than or equal to: Selects all records with contents that include the specified value and appear alphabetically before the specified value in this field.
    • is between: Selects all records that contain data between the values in the Value and Value 2 fields. For example, entering 5 in the Value field and 10 in the Value 2 field will select all records that contain data equal to or greater than 5 and less than or equal to 10. The first value must be less than the second value.
    • is not between: Selects all records that contain data less than the value in the Value field and greater than the in the Value 2 field. For example, entering 5 in the Value field and 10 in the Value 2 field will select values less than 5 and of more than 10. The first value must be less than the second value.
    • contains: Selects all records that contains the specified value anywhere within this field. This operator is only available for character fields (data types: Any Case Text or Exact Case Text).
    • does not contain: Selects all records not containing the specified value anywhere within this field. This operator is only available for character fields (data types: Any Case Text or Exact Case Text).
    • is a valid field: Selects all records containing valid data in this field. No value is needed or used with this operator, and it is only available for packed fields.
    • is not a valid field: Selects all records containing invalid data in this field. No value is needed or used with this operator, and it is only available for packed fields.

Values


    • A value consistent with the selected data type may be entered:
      • A value consistent with the selected data type may be entered:
        • One or more pairs of hex digits (0-9,A-F) for Hex
        • Either one pair of hex digits or eight binary digits (0-1) for Bit Mask
    • For Bit Mask, exactly two hex digits (0-9,A-F) or eight binary digits (0-1) must be entered. For example, 0F or 00001111.
    • For Packed and Binary values, no punctuation (decimals or commas) are permitted in the value.
    • For Binary, values may be signed or unsigned decimal numbers within the range allowed for the length. For example, with a length of 1 you may look for values in the range of (signed) -127 to +127 or (unsigned) 0 to 255. With a length of 2 you may look for values in the range of (signed) -32767 to +32767 or (unsigned) 0 to 65535. With a length of 4 (the default length) you may look for values in the range of (signed) -2147483647 to +2147483647 or (unsigned) 0 to 4294967295. With a length of 8 you may look for values in the range of -999999999999999999 + (or unsigned) 999999999999999999 (18-digit decimal number).
    • When the Use comma to separate values checkbox is selected, multiple values separated by commas may be specified to create an OR test for this condition. For example, a,b,c means a or b or c. The checkbox is ignored for Packed, Binary, Hex and Bit Mask data types, commas always mean an OR test for these data types. When the checkbox is selected (or implied) and a comma is entered in the value, it must not be the first character or last character in the value. This means that at least two values must be specified when using a comma to separate values.
    • When the Use comma to separate values checkbox is not selected for character data types (Any Case Text or Exact Case Text), commas are considered as data. For example a,b,c without the checkbox selected will attempt to search for the string a, b, c instead of a OR b OR c.
    • When using the special operators is a valid field and is an invalid field for packed fields, do not specify a value. Leave it blank.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Compuware Topaz Workbench 20.11