000-349 · Question #46
What is the method for indicating a reference to a specific occurrence of an input object in a map rule?
The correct answer is A. Enter the occurrence number in square brackets immediately after the input object name. In WTX/Sterling mapping, the standard notation for referencing a specific occurrence of a repeating input object is to append the occurrence number in square brackets directly after the object name (e.g., Record[3]).
Question
What is the method for indicating a reference to a specific occurrence of an input object in a map rule?
Options
- AEnter the occurrence number in square brackets immediately after the input object name.
- BUse the MEMBER function with the input object name as the first argument and the occurrence
- CUse the INDEX function with the occurrence number as the argument.
- DCall a functional map and use the COUNT function to track the number of occurrences.
How the community answered
(19 responses)- A84% (16)
- B5% (1)
- C11% (2)
Why each option
In WTX/Sterling mapping, the standard notation for referencing a specific occurrence of a repeating input object is to append the occurrence number in square brackets directly after the object name (e.g., Record[3]).
Square bracket notation appended immediately after an input object name (e.g., InputObject[2]) is the built-in WTX syntax for addressing a precise instance of a repeating object within a map rule. This approach requires no additional functions and is directly supported by the map compiler, making it the designated method for occurrence-specific references.
There is no MEMBER function in the standard WTX/Sterling map function library that accepts an object name and occurrence number as arguments to return a specific instance of a repeating object.
INDEX returns the occurrence number of the object currently being processed in a loop context - it does not accept an occurrence number as input to navigate to a specific instance of an object.
Using a functional map with COUNT is an indirect workaround for tracking total occurrences and does not constitute the standard or supported method for referencing a particular occurrence of an input object.
Concept tested: Square bracket occurrence reference syntax in map rules
Source: https://www.ibm.com/docs/en/b2b-integrator/6.1?topic=rules-referencing-specific-occurrence
Topics
Community Discussion
No community discussion yet for this question.