Match FieldsWhen the Match Fields control is selected, the Organise Fields tool matches fields based on:
The number of fields and each field's type are computed for each subsequent line of the input file and this information is then compared with the information gleaned from the first line. If a discrepancy in number of fields or field type is identified, an appropriate message is displayed and processing stops. The match succeeds if all lines contain the same number of fields and each field at a certain position on each line is of the same type. |
ExamplesIf an input file contains the following lines:
xxx (1, "abc", 101, rst);
xxx (2, "def", 202, uvw); xxx (3, "ghi", 303, xyz); As each line contains the same number (4) of fields, and, positionally, each field is of the same type (the first, third and fourth fields of each line are unquoted, and the second field of each line is quoted) the Match Fields criteria will be successful and the fields of the first line of the input file will be displayed. If an input file contains the following lines:
xxx ("ab", 101, st);
xxx ("cd", 202, "uv"); xxx ("ef", 303, wx); xxx ("gh", 404, yz); Although each line contains the same number (3) of fields, the Match Fields criteria will fail and the fields of the first line of the input file will not be displayed. In this example, the Match Fields criteria fails after line 2 has been processed because field 3 of this line is quoted and the corresponding field of line 1 is unquoted. |

