Quiz

Select the best answer for each question. After completing the quiz, check your answers using the answer key in the appendix.
  1. Which of the following statements is false?
    1. A macro variable can be defined and referenced anywhere in a SAS program except within data lines.
    2. Macro variables are always user-defined, and their values remain constant until they are changed by the user.
    3. Macro variables are text strings that are independent of SAS data sets.
    4. The values of macro variables can be up to 65,534 characters long.
  2. Which of the following TITLE statements correctly references the macro variable Month?
    1. title "Total Sales for '&month' ";
    2. title "Total Sales for 'month'";
    3. title "Total Sales for &month";
    4. title Total Sales for "&month";
  3. Which of the following statements generates an error message while trying to display the value of the macro variable Month in the SAS log?
    1. options &month;
    2. %PUT &=month;
    3. options symbolgen;
    4. %PUT the macro variable MONTH has the value &month.;
  4. Which statement creates a macro variable named Location that has the value storage?
    1. &let location = storage;
    2. let &location = storage;
    3. %let location = "storage";
    4. %let location = storage;
  5. What value will these statements assign to the macro variable Reptile?
    %let area = "Southeast";
    %let reptitle = *  Sales Report for &area Area  *;
    1. Sales Report for Southeast Area
    2. Sales Report for "Southeast" Area
    3. *Sales Report for "Southeast" Area*
    4. *  Sales Report for "Southeast" Area  *
  6. If a macro trigger is embedded in a literal token and you want the trigger to resolve, then the literal string must be enclosed in double quotation marks.
    1. True
    2. False
  7. What are the four types of tokens that SAS recognizes?
    1. expressions, literals, names, and special characters
    2. literals, names, numbers, and special characters
    3. expressions, names, numbers, and special characters
    4. expressions, literals, numbers, and special characters
  8. Which statement about the macro processor is false?
    1. It compiles and executes macro statements.
    2. It breaks SAS programs into tokens.
    3. It writes macro variables and values to the global symbol table.
    4. It reads values from the global symbol table and writes them to the input stack.
  9. How does the word scanner detect the end of a token?
    1. It encounters a new token, or encountering a blank delimiter.
    2. It encounters the end-of-file character.
    3. It encounters an error.
    4. It encounters a statement such as RUN or QUIT.
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