Chapter 12: SAS Formats and Informats

  1. Correct answer: c
    If you do not specify the LIBRARY= option, formats are stored in a default format catalog named Work.Formats. The libref Work signifies that any format that is stored in Work.Formats is a temporary format; it exists only for the current SAS session.
  2. Correct answer: a
    To store formats in a permanent catalog, you first write a LIBNAME statement to associate the libref with the SAS data library in which the catalog will be stored. Then add the LIB= (or LIBRARY=) option to the PROC FORMAT statement, specifying the name of the catalog.
  3. Correct answer: d
    The name of a format that is created with a VALUE statement must begin with a dollar sign ($) if it applies to a character variable.
  4. Correct answer: b
    A semicolon is needed after the PROC FORMAT statement. The VALUE statement begins with the keyword VALUE and ends with a semicolon after all the labels have been defined.
  5. Correct answer: d
    You can list values separated by commas, but the list must contain either all numeric values or all character values. Data set variables are either numeric or character.
  6. Correct answer: d
    When specifying a label, enclose it in quotation marks and limit the label to 32,767 characters.
  7. Correct answer: d
    MISS and MISSING are invalid keywords, and LOW does not include missing numeric values. The keyword OTHER can be used in the VALUE statement to label missing values as well as any values that are not specifically included in a range.
  8. Correct answer: b
    By placing the FORMAT statement in a DATA step, you permanently associate the defined format with variables.
  9. Correct answer: b
    To associate a user-defined format with a variable, place a period at the end of the format name when it is used in the FORMAT statement.
  10. Correct answer: d
    Adding the keyword FMTLIB to the PROC FORMAT statement displays a list of all the formats in your catalog, along with descriptions of their values.
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.138.69.163