Split Control Field

A split control field is formed when you assign more than one field in an input record the same control level indicator. For a program described file, the fields that have the same control level indicator are combined by the program in the order specified in the input specifications and treated as a single control field (see Figure 1). The first field defined is placed in the high-order (leftmost) position of the control field, and the last field defined is placed in the low-order (rightmost) position of the control field.

Figure 1. Split Control Fields
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
IFilename++SqNORiPos1+NCCPos2+NCCPos3+NCC................................
I........................Fmt+SPFrom+To+++DcField+++++++++L1M1FrPlMnZr....
IMASTER        01
I                                 28   31  CUSNO         L4
I                                 15   20  ACCTNO        L4
I                                 50   52  REGNO         L4
For an externally described file, fields that have the same control level indicator are combined in the order in which the fields are described in the data description specifications (DDS), not in the order in which the fields are specified on the input specifications. For example, if these fields are specified in DDS in the following order:
and if these fields are specified with the same control level indicator in the following order on the input specifications:

the fields are combined in the following order to form a split control field: EMPNO DPTNO REGNO.

Some special rules for split control fields are:

Figure 2 shows examples of the preceding rules.

Figure 2. Split Control Fields–Special Rules
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
IFilename++SqNORiPos1+NCCPos2+NCCPos3+NCC................................
I........................Fmt+SPFrom+To+++DcField+++++++++L1M1FrPlMnZr....
IDISK      BC  91   95 C1
I         OR   92   95 C2
I         OR   93   95 C3
I
 * All portions of the split control field must be assigned the same
 * control level indicator and all must have the same field record
 * relation entry.
I                                  1    5  FLD1A         L1
I                                 46   50  FLD1B         L1
I                                 11   13  FLDA          L2
I                                 51   60  FLD2A         L3
I                                 31   40  FLD2B         L3
I                                 71   75  FLD3A         L4  92
I                                 26   27  FLD3B         L4  92
I                                 41   45  FLD3C         L4  92
I                                 61   70  FLDB              92
I                                 21   25  FLDC              92
I                                  6   10  FLD3D         L4  93
I                                 14   20  FLD3E         L4  93
The record identified by a '1' in position 95 has two split control fields:
  1. FLD1A and FLD1B
  2. FLD2A and FLD2B
The record identified with a '2' in position 95 has three split control fields:
  1. FLD1A and FLD1B
  2. FLD2A and FLD2B
  3. FLD3A, FLD3B, and FLD3C
The third record type, identified by the 3 in position 95, also has three split control fields:
  1. FLD1A and FLD1B
  2. FLD2A and FLD2B
  3. FLD3D and FLD3E