Translation

The following is a step-by-step explanation of how the translator processed the map using the preceding rule.

  1. The translator initiates the Input side of the map.
    1. The first NTE segment is processed.
      Note: The translator reads the first occurrence of the NTE segment. The rule finds the qualifier Y in the NTE01 element, so it maps the contents of the NTE02 element to the first occurrence of the TEMP_NTE segment.
    2. The second NTE segment is processed.
      Note: The translator is reading the second occurrence of the NTE segment. The rule does not find the qualifier of Y, so the translator does not write any data to the second occurrence of the TEMP_NTE segment.
    3. The third NTE segment is processed.
      Note: The translator is reading the third occurrence of the NTE segment. The rule does not find the qualifier of Y, so the translator does not write any data to the third occurrence of the TEMP_NTE segment.
    4. The fourth NTE segment is processed.
      Note: The translator reads the fourth occurrence of the NTE segment. The rule finds the qualifier Y in the NTE01 element, so it maps the contents of the NTE02 element to the fourth occurrence of the TEMP_NTE segment.
    5. The fifth NTE segment is processed.
      Note: The translator reads the fifth occurrence of the NTE segment. The rule finds the qualifier Y in the NTE01 element, so it maps the contents of the NTE02 element to the fifth occurrence of the TEMP_NTE segment.
  2. The translator initiates the Output side of the map.
    1. The translator processes the first occurrence of the TEMP_NTE segment to verify whether there is any data to be linked across to the Output side of map.
      Note: The first occurrence of the TEMP_NTE segment contains data, so the translator passes that data across to the Output segment.
    2. The translator processes the second occurrence of the TEMP_NTE segment to verify whether there is any data to be linked across.
      Note: There is no data in the second occurrence of the TEMP_NTE segment, so the translator is finished processing the TEMP_NTE segment and moves to the next segment to process it.

The following table is an example of the array the translator would create for the TEMP_NTE segment using the extended rule that does not use indexes:

Occurrence
Data Generated
1
Must include this line in the output file.
2
Must include this line in the output file.
3
Must include this line in the output file.

The following table demonstrates that an extended rule must use an index so that the data is written to each occurrence of the array, consecutively:

Occurrence
Data Generated
1
Must include this line in the output file.
2
Must include this line in the output file.
3
Must include this line in the output file.