Occurrence and escape conditions

(1) If the input file does not include groups

To process the parts within the input Hierarchy format information that do not include groups, check whether the occurrence conditions hit the input record in turn. For details, see the following example:

Figure 4.8 Occurrence condition

1) Check whether Input Record 1 hits the occurrence condition of Record A in the input Hierarchy format information.

The occurrence key does not match in this example, but No-hit behavior for Record A is set to Use the default value, so no error occurs. Proceed to step 2.

2) Check whether Input Record 1 hits the occurrence condition of Record B in the input Hierarchy format information.

The key matches, so the format information for Record B is applied to Input Record 1.

3) Check whether Input Record 2 hits the occurrence condition of Record C in the input file format information.

The key does not match, and No-hit behavior for Record C is set to "Error", so an error occurs.

(2) If the input file includes groups

To process the parts within the input Hierarchy format information that include groups, first determine whether to apply the groups. If the input record hits the occurrence condition of any record in a group, apply that group. For details, see the following example:

Figure 4.9 Occurrence and escape conditions

1) Check whether Input Record N hits the escape condition of GROUP1.

The escape key does not match in this example, so proceed to step 2 without escaping from the group.

2) Determine whether to apply GROUP1.

If the key value of Input Record N matches any one of the occurrence conditions of records within GROUP1, apply the group.

  • 2)-1

    Check whether Input Record N hits the occurrence condition of the record GRP_A in GROUP1.

    The key values do not match, so proceed to 2)-2.

  • 2)-2

    Check whether Input Record N hits the occurrence condition of the record GRP_B in GROUP1.

    The key values match, so decide whether to apply GROUP1 to the input record.

    When you decide to apply GROUP1, again check whether the input record hits the occurrence conditions, in turns from the top of GROUP1. No-hit behavior is considered here for the first time.

    The behavior is the same as the behavior described in (1) If the input file does not include groups.

3) If Input Record N hits none of the occurrence conditions of records in GROUP1, escape from GROUP1 and check the occurrence conditions of the next record.

= Remarks =

If a group is not applied, No-hit behavior for the records in the group is not applied either.

Note

For any of the records in a group for which Occurrence condition is set to No conditions, note that the group is always applied, because the occurrence condition is always hit. To avoid unpredictable application of a group, consider the following points:

  • Set appropriate escape conditions to groups.

  • For records in groups, set Occurrence condition to No conditions only when necessary.