nerdexam
IBM

000-349 · Question #43

The following map rule returns the incorrect results; however the map rule does return the expected results when each LOOKUP is run independently. =IF(PRESENT(Name:.:AddressFile)…

The correct answer is B. Both LOOKUPs reference the same series object. When two LOOKUP functions in the same map rule reference the same series object, the second LOOKUP does not restart from the beginning but continues from the position where the first LOOKUP left off, producing incorrect results.

Troubleshooting

Question

The following map rule returns the incorrect results; however the map rule does return the expected results when each LOOKUP is run independently. =IF(PRESENT(Name:.:AddressFile), LOOKUP(Record:input,Field1 Field:Record:input=aa"), LOOKUP(Record:input,Field1 Field:Record:input=ic")) Why does the rule return the incorrect results?

Options

  • AIF(PRESENT) was used instead of WHEN(PRESENT)
  • BBoth LOOKUPs reference the same series object.
  • CTwo LOOKUPs are not allowed in a single map rule.
  • DThe syntax of the object name Name:.:AddressFile is incorrect.

How the community answered

(20 responses)
  • A
    5% (1)
  • B
    70% (14)
  • C
    20% (4)
  • D
    5% (1)

Why each option

When two LOOKUP functions in the same map rule reference the same series object, the second LOOKUP does not restart from the beginning but continues from the position where the first LOOKUP left off, producing incorrect results.

AIF(PRESENT) was used instead of WHEN(PRESENT)

IF(PRESENT) is valid syntax for checking the presence of an object before executing logic; replacing it with WHEN(PRESENT) would not resolve the positional conflict between the two LOOKUPs.

BBoth LOOKUPs reference the same series object.Correct

In IBM Sterling map rules, a series object maintains a pointer to its current position in the data. When both LOOKUPs reference the same series object, the second LOOKUP inherits the advanced pointer state left by the first, skipping records that should be evaluated. This is why each LOOKUP works correctly in isolation but fails when combined in a single rule.

CTwo LOOKUPs are not allowed in a single map rule.

Multiple LOOKUP functions are permitted within a single map rule; the problem is the shared series object state, not a rule syntax restriction.

DThe syntax of the object name Name:.:AddressFile is incorrect.

The object name syntax Name:.:AddressFile is a valid hierarchical reference format used in Sterling map rules and is not the source of the incorrect results.

Concept tested: Series object pointer conflict with multiple LOOKUPs

Source: https://www.ibm.com/docs/en/b2b-integrator/6.1.2?topic=functions-lookup

Topics

#LOOKUP function#series objects#IF PRESENT#map rule debugging

Community Discussion

No community discussion yet for this question.

Full 000-349 Practice