SAS Chapter 7: Creating And Applying User-defined Formats

10 Questions | Total Attempts: 167

SettingsSettingsSettings
SAS Quizzes & Trivia

Practice for the SAS basic certification exam.


Questions and Answers
  • 1. 
    If you don't specify the LIBRARY= option, your formats are stored in Work.Formats, and they exist ...
    • A. 

      Only for the current procedure.

    • B. 

      Only for the current DATA step.

    • C. 

      Only for the current SAS session

    • D. 

      Permanently.

  • 2. 
    Which of the following statements will store your formats in a permanent catalog?
    • A. 

      Libname library 'c:\sas\formats\lib'; proc format lib=library       ...;

    • B. 

      Libname library 'c\sas\formats\lib'; format lib=library      ...;

    • C. 

      Library='c:\sas\formats\lib'; proc format library      ...;

    • D. 

      Library='c:\sas\format\lib'; proc library      ...;

  • 3. 
    When creating a format with the VALUE statement, the format's new name
    • cannot end with a number
    • cannot end with a period
    • cannot be the name of a SAS format, and...
    • A. 

      Cannot be the name of a data set variable.

    • B. 

      Must be at least two characters long.

    • C. 

      Must be at least eight characters long.

    • D. 

      Must begin with a dollar sign ($) if used with a character variable.

  • 4. 
    Which of the following FORMAT procedures is written correctly?
    • A. 

      Proc format lib=library      value colorfmt;            1='Red'            2='Green'            3='Blue' run;

    • B. 

      Proc format lib=library;      value colorfmt            1='Red'            2='Green'            3='Blue'; run;

    • C. 

      Proc format lib=library;      value colorfmt;            1='Red'            2='Green'            3='Blue' run;

    • D. 

      Proc format lib=library;      value colorfmt            1='Red';            2='Green';            3='Blue'; run;

  • 5. 
    Which of these is false?  Ranges in the VALUE statement can specify... 
    • A. 

      A single value such as 24 or 's'.

    • B. 

      A range of numeric values, such as 0-1500.

    • C. 

      A range of character values, such as 'A'-'M'.

    • D. 

      A list of numeric and character values separated by commas, such as 90,'B','D',270.

  • 6. 
    How many characters can be used in a label?
    • A. 

      40

    • B. 

      96

    • C. 

      200

    • D. 

      256

  • 7. 
    Which keyword can be used to label missing numeric values as well as any values that are not specified in the range?
    • A. 

      LOW

    • B. 

      MISS

    • C. 

      MISSING

    • D. 

      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?
    • A. 

      You temporarily associate the formats with variables.

    • B. 

      You permanently associate the formats with variables.

    • C. 

      You replace the original data with the format labels.

    • D. 

      You make the formats available to other data sets.

  • 9. 
    The format JOBFMT was created in a FORMAT procedure.  Which FORMAT statement will apply to the variable JobTitle in the program output?
    • A. 

      Format jobtitle jobfmt;

    • B. 

      Format jobtitle jobfmt.;

    • C. 

      Format jobtitle=jobfmt;

    • D. 

      Format jobtitle='jobfmt';

  • 10. 
    Which keyword, when added to the PROC FORMAT statement, will display all the formats in your catalog?
    • A. 

      CATALOG

    • B. 

      LISTFMT

    • C. 

      FMTCAT

    • D. 

      FMTLIB

Related Topics