Chapter Quiz

Select the best answer for each question. Check your answers using the answer key in the appendix.
  1. Suppose you do not specify the LIBRARY= option and your formats are stored in Work.Formats. How long do they exist?
    1. only for the current procedure
    2. only for the current DATA step
    3. only for the current SAS session
    4. permanently
  2. Which of the following statements store your formats in a permanent catalog?
    1. libname formtlib 'C:UsersStudent1sasformatslib'; 
      proc format lib=formtlib 
         ...;
    2. libname formtlib 'C:UsersStudent1sasformatslib'; 
      format lib=formtlib 
         ...;
    3. formtlib='C:UsersStudent1sasformatslib'; 
      proc format formtlib 
         ...;
    4. formtlib='C:UsersStudent1sasformatslib';  
      proc formtlib 
         ...;
  3. When you create a format with the VALUE statement, the new format's name cannot end with a number, cannot end with a period, and cannot be the name of a SAS format. Which of the following is also true?
    1. The name cannot be the name of a data set variable.
    2. The name must be at least two characters long.
    3. The name must be at least eight characters long.
    4. The name must begin with a dollar sign ($) if used with a character variable.
  4. Which of the following FORMAT procedures is written correctly?
    1. proc format lib=formtlib 
         value colorfmt; 
               1='Red'
               2='Green' 
               3='Blue' 
      run;
    2. proc format lib=formtlib; 
         value colorfmt 
               1='Red' 
               2='Green' 
               3='Blue'; 
      run;
    3. proc format lib=formtlib; 
         value colorfmt; 
               1='Red' 
               2='Green' 
               3='Blue' 
      run;
    4. proc format lib=formtlib; 
         value colorfmt 
               1='Red'; 
               2='Green'; 
               3='Blue'; 
      run;
  5. Which of these statements is false regarding what the ranges in the VALUE statement can specify?
    1. They can specify a single value, such as 24 or 'S'.
    2. a range of numeric values, such as 0-1500.
    3. a range of character values, such as 'A'-'M'.
    4. a list of numeric and character values separated by commas, such as 90,'B', 180,'D',270.
  6. How many characters can be used in a label?
    1. 96
    2. 200
    3. 256
    4. 32,767
  7. Which keyword can be used to label missing numeric values as well as any values that are not specified in a range?
    1. LOW
    2. MISS
    3. MISSING
    4. OTHER
  8. You can place the FORMAT statement in either a DATA step or a PROC step. What happens when you place it in a DATA step?
    1. You temporarily associate the formats with variables.
    2. You permanently associate the formats with variables.
    3. You replace the original data with the format labels.
    4. You make the formats available to other data sets.
  9. Suppose the format JOBFMT was created in a FORMAT procedure. Which FORMAT statement applies it to the variable JobTitle in the program output?
    1. format jobtitle jobfmt;
    2. format jobtitle jobfmt.;
    3. format jobtitle=jobfmt;
    4. format jobtitle='jobfmt';
  10. Which keyword, when added to the PROC FORMAT statement, displays all the formats in your catalog?
    1. CATALOG
    2. LISTFMT
    3. FMTCAT
    4. FMTLIB
Last updated: August 23, 2018
..................Content has been hidden....................

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