Statistical Analysis System (SAS) Programming Certification Practice Exam

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for the SAS Programming Certification Exam with our comprehensive quiz. Study with multiple-choice questions, detailed explanations, and helpful hints to boost your confidence. Ace your certification test!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which function can be used to parse words within a character string based on a delimiter?

  1. SUBSTR

  2. SCAN

  3. INPUT

  4. PUT

The correct answer is: SCAN

The SCAN function is specifically designed to parse words within a character string by utilizing a specified delimiter. It takes a character string and retrieves individual words based on the delimiter provided. For example, if you have a string containing a sentence and you want to extract specific words separated by spaces (or any other character), the SCAN function makes this task straightforward and efficient. You can specify which word to extract by indicating its position in the original string, making it a versatile choice for text parsing. In contrast, the SUBSTR function is used to extract a substring from a character string based on specified starting position and length, rather than parsing by delimiters. The INPUT function is meant for converting character strings to numeric values, which does not involve parsing for words. Similarly, the PUT function is used to convert numeric variables to character strings, focusing instead on data representation rather than text parsing. Thus, SCAN stands out as the appropriate choice for the task of word parsing by delimiters.