Translation with Indexes (Simple Example)
This section explains how the translator processes the map using the preceding extended rule:
- The translator initiates the input side of the map.
- 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.
- 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.
- 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.
- 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.
- 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.
- The first NTE segment is processed as follows:
- The translator initiates the output side of the map.
- 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.
- 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.
- 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.
- 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.
- 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.