Assigning Match Field Values (M1-M9)

When assigning match field values (M1 through M9) to fields on the input specifications in positions 65 and 66, consider the following:

Figure 44 is an example of how match fields are specified.

Figure 44. Match Fields in Which All Values Match
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords++++++++++++++++++++++++++++
 * The files in this example are externally described (E in position
 * 22) and are to be processed by keys (K in position 34).
FMASTER    IP   E           K DISK
FWEEKLY    IS   E           K DISK
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
IRcdname+++....Ri........................................................
I..............Ext-field+..................Field+++++++++L1M1..PlMnZr....
 *                           MASTER FILE
IEMPMAS        01
I                                          EMPLNO          M1
I                                          DIVSON          M3
I                                          DEPT            M2
IDEPTMS        02
I                                          EMPLNO          M1
I                                          DEPT            M2
I                                          DIVSON          M3
 *                           WEEKLY FILE
IWEEKRC        03
I                                          EMPLNO          M1
I                                          DIVSON          M3
I                                          DEPT            M2

Three files are used in matching records. All the files have three match fields specified, and all use the same values (M1, M2, M3) to indicate which fields must match. The MR indicator is set on only if all three match fields in either of the files EMPMAS and DEPTMS are the same as all three fields from the WEEKRC file.

The three match fields in each file are combined and treated as one match field organized in the following descending sequence:

DIVSON
M3
DEPT
M2
EMPLNO
M1

The order in which the match fields are specified in the input specifications does not affect the organization of the match fields.

Figure 45. Match Fields with a Dummy M2 Field
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
IFilename++SqNORiPos1+NCCPos2+NCCPos3+NCC................................
I........................Fmt+SPFrom+To+++DcField+++++++++L1M1FrPlMnZr....
IDISK      AB  01    1 C1
I         OR   02    1 C2
I         OR   03    1 C3
I                                  1   10 0EMPNO           M1
I                                 11   15 0DUMMY           M2
I                                 11   15 0DEPT            M202
I                                 16   20 0DEPT            M203
This figure illustrates Match Fields with a Dummy M2 Field

Three different record types are found in the input file. All three contain a match field in positions 1 through 10. Two of them have a second match field. Because M1 is found on all record types, it can be specified without a field record relation entry in positions 67 and 68. If one match value (M1 through M9) is specified without field record relation entries, all match values must be specified once without field record relation entries. Because the value M1 is specified without field record relationship, an M2 value must also be specified once without field record relationship. The M2 field is not on all record types; therefore a dummy M2 field must be specified next. The dummy field can be given any unique name, but its specified length must be equal to the length of the true M2 field. The M2 field is then related to the record types on which it is found by field record relation entries.

Figure 46. Match Field Specifications for Three Disk Files
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
FFilename++IPEASFRlen+LKlen+AIDevice+.Keywords++++++++++++++++++++++++++++
FPRIMARY   IPEA F   64        DISK
FFIRSTSEC  IS A F   64        DISK
FSECSEC    IS A F   64        DISK

*...1....+....2....+....3....+....4....+....5....+....6....+....7...
IFilename++SqNORiPos1+NCCPos2+NCCPos3+NCC................................
I........................Fmt+SPFrom+To+++DcField+++++++++L1M1FrPlMnZr....
IPRIMARY   AA  01    1 CP    2NC
I                                  2    3  MATCH           M1
 *
I          BB  02    1 CP    2 C
I                                  2    3  NOM
 *
IFIRSTSEC  AB  03    1 CS    2NC
I                                  2    3  MATCH           M1
 *
I          BC  04    1 CS    2 C
I                                  2    3  NOM
 *
ISECSEC    AC  05    1 CT    2NC
I                                  2    3  MATCH           M1
 *
I          BD  06    1 CT    2 C
I                                  2    3  NOM


[ Top of Page | Previous Page | Next Page | Contents | Index ]