MATCH Examples
Example 1:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12345ABCDE·· |
|
|
|
|
|
|
ABCDE12345·· |
|
| |||||
|
|
| ||||
The EQUAL (or ZERO) Condition Flag is set.
Example 2:
|
|
|
|
|
|
|
|
|
|
|
|
|
12345ABCDE·· |
|
|
|
|
|
|
ABCDE12345·· |
|
| |||||
|
|
| ||||
The EQUAL (or ZERO) Condition Flag is set. The LESS Condition Flag is also set because the destination field is shorter than the source field.
Example 3:
|
|
|
|
|
|
|
|
|
|
|
|
|
12345ABCDE·· |
|
|
|
|
|
|
ABCDE12245·· |
|
| |||||
|
|
| ||||
The LESS Condition Flag is set.
Example 4:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12345ABCDE |
|
| |||||
|
|
| ||||
The LESS Condition Flag is set. The hexadecimal value of numeric characters is less than that of alphabetic characters.
Example 5:
|
|
|
|
|
|
|
|
|
|
|
|
|
12345ABCDE |
|
| |||||
|
|
| ||||
The EQUAL (or ZERO) Condition Flag is set. The source operand was shorter than the destination operand. Therefore, the LESS Condition Flag is not set (FALSE).
Example 6:
|
|
|
|
|
|
|
|
|
|
|
|
|
12345ABXXX |
|
| |||||
|
|
| ||||
No Condition Flags are set (all FALSE). The first non-matching source character (C) is less than the first non-matching destination character (X).
Example 7:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SM?TH·········· |
|
|
|
|
|
|
SMYTHE, JOHN A. ······ |
|
| |||||
|
|
| ||||
The EQUAL (or ZERO) Condition Flag is set.
Example 8:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SMITH·········· |
|
|
|
|
|
|
JOHN A. ············ |
|
|
|
|
|
|
SMITH·········· |
|
|
|
|
|
|
JOHN A. ············ |
|
| |||||
|
|
| ||||
The EQUAL (or ZERO) Condition Flag is set.
Example 9:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SMITH·········· |
|
|
|
|
|
|
JOHN A. ············ |
|
|
|
|
|
|
SMITH·········· |
|
|
|
|
|
|
JOHN A. ············ |
|
| |||||
|
|
| ||||
The EQUAL (or ZERO) Condition Flag is cleared. The Logical Length of the second field is shorter in the second record.
![]() |