SAS Chapter 4: Creating List Reports

10 Questions | Total Attempts: 272

SettingsSettingsSettings
SAS Chapter 4: Creating List Reports - Quiz

Preparation for the SAS basic certification exam.


Questions and Answers
  • 1. 
    Which PROC PRINT step below creates the following output
    • A. 

      Proc print data=flights.laguardia noobs;      var on changed flight;      where on>=160; run;

    • B. 

      Proc print data=flights.laguardia;      var date on changed flight;      where changed>3; run;

    • C. 

      proc print data=flights.laguardia label;      id date;      var boarded transferred flight;      label boarded='On' transferred='Changed';      where flight='219'; run;

    • D. 

      Proc print flights.laguardia noobs;      id date;      var date on changed flight;      where flight='219'; run;

  • 2. 
    Which of the following PROC PRINT steps is correct if labels are not stored with the data set?
    • A. 

      Proc print data=allsales.totals label;      label region8='Region 8 Yearly Totals'; run;

    • B. 

      Proc print data=allsales.totals;      label region8='Region 8 Yearly Totals'; run;

    • C. 

      Proc print data allsales.totals label noobs; run;

    • D. 

      Proc print allsales.totals label; run;

  • 3. 
    Which of the following statements selects from a data set only those observations for which the value of the variable Style is RANCH, SPLIT, or TWOSTORY?
    • A. 

      Where style='RANCH' or 'SPLIT' or 'TWOSTORY';

    • B. 

      Where style in 'RANCH' or 'SPLIT' or 'TWOSTORY';

    • C. 

      Where style in (RANCH, SPLIT, TWOSTORY);

    • D. 

      Where style in ('RANCH','SPLIT','TWOSTORY');

  • 4. 
    If you want to sort your data and create a temporary data set named Calc to store the sorted data, which of the following steps should you submit?
    • A. 

      Proc sort data=work.calc out=finance.dividend; run;

    • B. 

      Proc sort dividend out=calc;       by account; run;

    • C. 

      Proc sort data=finance.dividend out=work.calc;      by account; run;

    • D. 

      Proc sort from finance.dividend to calc;      by account; run;

  • 5. 
    Which options are used to create the following PROC PRINT output?
    • A. 

      The DATE system option and the label option in PROC PRINT

    • B. 

      The DATE and NONUMBER system option and the DOUBLE and NOOBS options in PROC PRINT

    • C. 

      The DATE and NONUMBER system options and the DOUBLE option in PROC PRINT

    • D. 

      The DATE and the NONUMBER system options and the NOOBS option in PROC PRINT

  • 6. 
    Which of the following statements can you use in a PROC PRINT step to create this output?
    • A. 

      Var month instructors; sum instructors aerclass walkjogrun swim;

    • B. 

      Var month; sum instructors aerclass walkjogrun swim;

    • C. 

      Var month instructors aerclass; sum instructors aerclass walkjogrun swim;

    • D. 

      All of the above

  • 7. 
    What happens if you submit the following program? proc sort data=clinic.diabetes; run; proc print data=clinic.diabetes;      var age height weight pulse;      where sex='F'; run;
    • A. 

      The PROC PRINT step runs successfully, printing observations in their sorted order.

    • B. 

      The PROC SORT step permanently sorts the input data set.

    • C. 

      The PROC SORT step generates errors and stops processing, but the PROC PRINT step runs successfully, printing observations in their original (unsorted) order.

    • D. 

      The PROC SORT step runs successfully, but the PROC PRINT step generates errors and stops processing.

  • 8. 
    If you submit the following program, which output does it create? proc sort data=finance.loans out=work.loans;      by months amount; run; proc print data=work.loans noobs;      var months;      sum amount payment;      where months<360; run;
    • A. 
    • B. 
    • C. 
    • D. 
  • 9. 
    Choose the statement below that selects rows in which 
    • the amount is less than or equal to $5000
    • the account is 101-1092 or the rate equals 0.095.
    • A. 

      Where amount <= 5000 and       account='101-1092' or rate =0.095;

    • B. 

      Where (amount le 5000 and account='101-1092')      or rate =0.095;

    • C. 

      Where amount <= 5000 and       (account='101-1092' or rate eq 0.095);

    • D. 

      Where amount <= 5000 or account='101-1092'      or rate = 0.095;

  • 10. 
    What does PROC PRINT display by default?
    • A. 

      PROC PRINT does not create a default report; you must specify the rows and columns to be displayed.

    • B. 

      PROC PRINT displays all observations and variables in the data set. If you want an additional column for observation numbers, you can request it.

    • C. 

      PROC PRINT displays columns in the following order: a column for observation numbers, all character variables, and all numeric variables.

    • D. 

      PROC PRINT displays all observations and variables in the data set, a column for observation numbers on the far left, and variables in the order in which they occur in the data set.

Related Topics
Back to Top Back to top