Chapter Review Quiz


Formatting Data Values

Select the best answer for each question. When you are finished, click Submit Quiz.

  1. Which of the following is a valid name for a character format?

     a.   country
     b.   $ctry
     c.   $country.
     d.   _country


  2. You specify the variable to which a format applies when creating it in a PROC FORMAT step.

     a.   True
     b.   False


  3. Which of the following FORMAT statements was used to create this output?

    Employee_ID
    Job_Title
    Salary
    120102
    Sales Manager
    $108255.00
    120103
    Sales Manager
    $87,975.00
    120121
    Sales Rep. II
    $26,600.00
    120122
    Sales Rep. II
    $27,475.00
    120123
    Sales Rep. I
    $26,190.00

     a.  
    format Salary dollar.;
     b.  
    format Salary dollar12.2;
     c.  
    format Salary dollar11.2;
     d.  
    format Salary dollar10.2;


  4. Which of the following FORMAT statements was used to create this output?

    Obs
    Order_ID
    Order_
    Date
    Delivery_
    Date
    1
    1230058123
    11JAN07

    01/11/07

    2
    1230080101
    15JAN07

    01/19/07

    3
    1230106883
    20JAN07

    01/22/07

    4
    1230147441
    28JAN07

    01/28/07

    5
    1230315085
    27FEB07

    02/27/07


     a.  
    format Order_Date date9. Delivery_Date mmddyy8.;
     b.  
    format Order_Date date7. Delivery_Date mmddyy8.;
     c.  
    format Order_Date ddmmmyy. Delivery_Date mmddyy8.;
     d.  
    format Order_Date monyy7. Delivery_Date mmddyy8.;


  5. Which of the following is not a valid user-defined format name?

     a.   $month
     b.   group_a
     c.   comma
     d.   _gender


  6. You can use either < or > to define a non-inclusive range in a VALUE statement.

     a.   True
     b.   False


  7. The format name must include a period delimiter in the FORMAT statement.

     a.   True
     b.   False


  8. Given this$TITLE format, what would display for a value of Sales Rep II?

    proc format;
       value $title
          'Sales Manager',
          'Senior Sales Mgr'='Manager'      
          'Sales Rep. I',
          'Sales Rep. II'='Rep';
    run;
    
     a.   Sales Manager
     b.   Rep
     c.   Sales Rep II
     d.   Sales R


  9. A format modifies both the stored value and the displayed value.

     a.   True
     b.   False


  10. A FORMAT statement is used only to apply SAS formats.

     a.   True
     b.   False