PR000041 practice question 2 of 15
What function could be used to exchange 'i' with 'I' in the COMPANY port given the following expression? function name{1, COMPANY, 'i' , 'I')
Full set: 69 questionsThe REPLACECHR function is designed to replace a set of characters within a string with another character. The syntax is REPLACECHR(CaseFlag, InputString, OldCharSet, NewChar). The expression in the question, function name(1, COMPANY, 'i', 'I'), directly maps to this syntax. The first argument, 1, sets the function to be case-insensitive. The function will search for every character in the OldCharSet ('i') within the InputString (the COMPANY port) and replace it with the NewChar ('I').
A. CHOOSE: This is a conditional function that returns one of two specified values based on the result of a boolean condition; it does not perform string replacement.
C. REGREPLACE: This function replaces substrings based on a regular expression pattern. While it could achieve the result, its syntax (subject, pattern, newstring) does not match the provided expression's structure.
D. INSTR: This function returns the numeric starting position of a substring within a string. It is used for searching, not for replacing characters.
1. Informatica PowerCenter 10.2.0
Transformation Language Reference
Chapter 18: Functions
"REPLACECHR"
Page 398.
Quote: "Replaces characters in a string with a single character or no character... Syntax: REPLACECHR (CaseFlag
InputString
OldCharSet
NewChar)... Example: REPLACECHR(1
'Sessan'
's'
'X') returns 'XeXXan'." This confirms the function's purpose and syntax match the question's requirements.
2. Informatica PowerCenter 10.2.0
Transformation Language Reference
Chapter 18: Functions
"CHOOSE"
Page 298.
Quote: "Tests a condition and returns one of two values that you specify... Syntax: CHOOSE( condition
value1
value2 )." This shows it is a conditional
not a string manipulation function.
3. Informatica PowerCenter 10.2.0
Transformation Language Reference
Chapter 18: Functions
"REGREPLACE"
Page 392.
Quote: "Replaces characters in a string with a character string that you specify... Syntax: REGREPLACE( subject
pattern
newstring )." This confirms a different syntax and purpose (regex-based) from what is required.
4. Informatica PowerCenter 10.2.0
Transformation Language Reference
Chapter 18: Functions
"INSTR"
Page 338.
Quote: "Searches a string for a substring and returns the position of the substring... Syntax: INSTR( string
substring [
start [
occurrence]] )." This confirms the function is for finding positions
not replacement.
Question breakdown
Key idea: REPLACECHR(CaseFlag, InputString, OldCharSet, NewChar) swaps each character found in a character set for one replacement character, and its four-argument shape matches the expression.
How to reach the answer
- Map the argument pattern: an integer flag, a port, an old character, and a new character.
- Recall which function begins with a case flag followed by a string and two character arguments. That is REPLACECHR.
- Confirm the goal is replacement, which rules out search functions like INSTR.
- REG_REPLACE takes subject, pattern, and replacement with no leading case flag, so its signature does not fit.
- CHOOSE only selects a value by index and never alters a string.
Each option
Common trap: REG_REPLACE sounds like the obvious 'replace' function, but its argument order does not match an expression that starts with a case flag.
In practice: REPLACECHR is commonly used in Expression transformations to clean or normalize characters, such as stripping punctuation or fixing casing in name and code fields.
Remember: An integer case flag as the first argument followed by a string points to REPLACECHR or REPLACESTR; a non-zero flag means case-sensitive.
Drafted with AI assistance and checked against the answer key.
Keep practicing
Take the free PR000041 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other PR000041 practice questions
- Question 3Which of the following statements is correct on workflow events?
- Question 4Which port types are applicable to the Stored Procedure transformation?(Choose all that a…
- Question 5Which is the correct priority of assigning a mapping variable?
- Question 6Two pipelines (A & B) are entering a Joiner transformation with each having a record size…
- Question 7Referring to the Sequence Generator transformation, which statement is correct and true?
- Question 8Which statement on workflows is correct?
