Translation with Indexes (Simple Example)

This section explains how the translator processes the map using the preceding extended rule:

  1. The translator initiates the input side of the map.
    1. The first NTE segment is processed as follows:
      • The nte_cnt index is currently set to 1.
      • The rule found the qualifier Y in the NTE01. The value in the nte_cnt index is 1, so the data is written to the first occurrence of the TEMP_NTE segment.
      • The index is then incremented by one.
    2. The second NTE segment is processed as follows:
      • The nte_cnt index is currently set to 2.
      • The rule did not find a Y qualifier, so the translator does not write anything to the second occurrence of the TEMP_NTE segment.
      • The index is not incremented because the statement was not processed.
    3. The third NTE segment is processed as follows:
      • The nte_cnt index is currently set to 2.
      • The rule did not find a Y qualifier, so the translator does not write anything to the third occurrence of the TEMP_NTE segment.
      • The index is not incremented because the statement was not processed.
    4. The fourth NTE segment is processed as follows:
      • The nte_cnt index is currently set to 2.
      • The rule found the qualifier Y in the NTE01. The value in the nte_cnt index is 2, so the data is written to the second occurrence of the TEMP_NTE segment.
      • The index is then incremented by one.
    5. The fifth NTE segment is processed as follows:
      • The nte_cnt index is currently set to 3.
      • The rule found the qualifier Y in the NTE01. The value in the nte_cnt index is 3, so the data is written to the third occurrence of the TEMP_NTE segment.
      • The index is then incremented by one.
  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 to the Output side of map.
      Note: The second occurrence of the TEMP_NTE segment contains data, so the translator passes that data across to the Output segment.
    3. The translator processes the third 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 third occurrence of the TEMP_NTE segment contains data, so the translator passes that data across to the Output segment.
    4. The translator processes the fourth 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 fourth occurrence of the TEMP_NTE segment does not contain data, so the translator is finished processing the TEMP_NTE segment.