Match FieldsWhen the Match Fields control is selected, the Align Fields tool, during a subsequent Check, 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 the Output Top area is not displayed.
If all lines contain the same number of fields and each field at a certain position on each line is of the same type, the match succeeds, the Output Top area is displayed and the OK button is enabled.
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) a Check incorporating Match Fields will be successful.
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, a Check incorporating Match Fields will fail after line 2 has been processed because field 3 of this line is quoted and the corresponding field of line 1 is unquoted.
NoteWhen the Match Fields control is selected, the Enforce Strict Field Count control is also automatically selected.