Chapter 14: Using Advanced Functions

  1. Correct answer: a
    The FIND function searches for a specific substring of characters within a character string. When the FIND function finds a substring, FIND returns the value of 1. When the substring is not found, FIND returns the value of 0.
  2. Correct answer: b
    The COUNT function counts the number of times CANADA appeared within the Text string. The COUNTW function counts the number of words in the Text string. A default list of delimiters is used when there are no delimiters specified.
  3. Correct answer: c
    The LAG function retrieves the previous value of a numeric or character column. You can use multiple LAG functions within a program. Answer c correctly assigns the variables and uses the LAG function to generate two lagged values.
  4. Correct answer: c
    PRXMATCH searches for a pattern match and returns the position at which the pattern is found. The string Dutch is found starting in the eighth position.
  5. Correct answer: a
    Use the PRXMATCH function in a Perl regular expression to search a string for a substring and return the position of a substring.
  6. Correct answer: b
    Use the PRXCHANGE function to change the order of first and last names. This PRXMATCH program uses metacharacters to define the search criteria and any text manipulation.
  7. Correct answer: a
    A Perl regular expression within the PRXMATCH function must start and end with a delimiter such as the forward slash.
  8. Correct answer: d
    The / (forward slash) is the beginning delimiter for a regular expression. The lowercase s specifies a substitution in a regular expression. ABC matches the letters ABC that you are attempting to replace. The / (forward slash) or middle delimiter separates the search pattern from the substitution pattern. ABC87 matches the letter ABC87 that are you attempting to substitute for ABC. The / (forward slash) is the ending delimiter for the regular expression.
Last updated: October 16, 2019
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset