Searching numeric fields

The display format, and whether or not you specify field column numbers (either as a list or a range) affects how the CHANGE, FIND, and EXCLUDE commands search numeric columns:
  • When searching data in SNGL or TABL display formats, for a field with numeric field attributes, File Manager by default interprets the search string as a number and performs a numeric comparison with the formatted numeric value of the field being searched.

    The numeric value of the search string must equal the formatted numeric value of the field. The lengths (number of digits) of the search string and of the numeric field are not significant. Similarly, the data type of the numeric field is not significant. For example, a search string of 123 matches a packed-decimal field containing 00123 or a floating-point field containing 1.230E+02. A search string of 123 does not match a packed-decimal field containing 12300 (because the numeric values are different). An unsigned value in the string is considered to be positive.

  • In CHAR, HEX, and LHEX display formats, or if you specify a column range, File Manager performs a string comparison between the search string and the character representation of the numeric field. If the search string happens to match the character representations of some of the bytes in a binary or packed decimal numeric field, then the numeric field is considered to be a match for the search string (and, for a FIND command, the entire field is highlighted). Similarly, a search string of 123 matches any “zoned” (or “display”) numeric field whose value contains that sequence of digits (for example, 12300 or 41235).
For example, the following command finds instances of an alphanumeric field (#3) containing the character "0" (such as "1060 HAY ST"), and instances of a numeric field (#5) whose formatted numeric value is zero:
FIND 0 ALL #3,#5