nerdexam
IBM

000-349 · Question #49

An application developer is creating a map to produce a report which will include literal text concatenated with a numeric item named TotalCount. Which map rule should the developer use to produce…

The correct answer is B. ="The totals are " + FROMNUMBER (TotalCount, "{#','###}") + "!". The FROMNUMBER function converts a numeric value to formatted text using a pattern string, which is required to produce a thousands-separated output like 2,541.

Development

Question

An application developer is creating a map to produce a report which will include literal text concatenated with a numeric item named TotalCount. Which map rule should the developer use to produce the following line of their report if TotalCount = 2541: The totals are 2,541!

Options

  • A="The totals are " + NUMBERTOTEXT (TotalCount) + "!"
  • B="The totals are " + FROMNUMBER (TotalCount, "{#','###}") + "!"
  • C="The totals are " + CONVERTTOTEXT (TotalCount, "{#','###}") + "!"
  • D="The totals are " + NUMBERTOTEXT (TotalCount, "{#','###}") + "!"

How the community answered

(34 responses)
  • A
    18% (6)
  • B
    71% (24)
  • C
    3% (1)
  • D
    9% (3)

Why each option

The FROMNUMBER function converts a numeric value to formatted text using a pattern string, which is required to produce a thousands-separated output like 2,541.

A="The totals are " + NUMBERTOTEXT (TotalCount) + "!"

NUMBERTOTEXT converts a number to text but does not accept a format pattern argument, so it cannot insert a thousands separator to produce '2,541'.

B="The totals are " + FROMNUMBER (TotalCount, "{#','###}") + "!"Correct

FROMNUMBER accepts a numeric argument and a format pattern string; the pattern specifying a comma as the thousands separator correctly produces '2,541' when TotalCount equals 2541, and this result is then concatenated with the surrounding literal strings to yield the exact expected output.

C="The totals are " + CONVERTTOTEXT (TotalCount, "{#','###}") + "!"

CONVERTTOTEXT is not a valid map function for numeric-to-text conversion with a format pattern in this mapping tool.

D="The totals are " + NUMBERTOTEXT (TotalCount, "{#','###}") + "!"

NUMBERTOTEXT does not support a second format argument, making this syntax invalid even though the format pattern itself is correct.

Concept tested: FROMNUMBER function with numeric format pattern

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

Topics

#FROMNUMBER function#number formatting#text concatenation#map rules

Community Discussion

No community discussion yet for this question.

Full 000-349 Practice