SAS Chapter 8: Creating Enhanced Reports

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Moxleyv
M
Moxleyv
Community Contributor
Quizzes Created: 38 | Total Attempts: 21,511
Questions: 10 | Attempts: 482

SettingsSettingsSettings
SAS Chapter 8: Creating Enhanced Reports - Quiz

Practice for the SAS basic certification exam.


Questions and Answers
  • 1. 

    If Style has four unique values and you submit the following program, which output do you get?  (Assume that all other variables are numeric.) proc report data=sasuser.houses nowd;    column style sqfeet bedrooms price;    define style / group; run;

    Correct Answer
    A.  
    Explanation
    This program creates a summary report, which consolidates into one row all observations from the data set that have a unique combination of values for the variable Style.

    Rate this question:

  • 2. 

    When you define an order variable,

    • A.

      The detail rows are ordered according to their formatted values.

    • B.

      You can't create summary reports.

    • C.

      PROC REPORT displays only the first occurrence of each order variable value in a set of rows that have the same value for all order variables,

    • D.

      All of the above

    Correct Answer
    D. All of the above
    Explanation
    Order variables do order rows according to the formatted values of the order variable, and PROC REPORT suppresses repetitious printing of order values. However, you can't use order variables in a summary report.

    Rate this question:

  • 3. 

    Which attributes or options are reflected in this PROC REPORT output?

    • A.

      SKIPLINE and FORMAT=

    • B.

      CENTER, HEADLINE, HEADSKIP, and either WIDTH=, SPACING=,or FORMAT=

    • C.

      SPACING= only

    • D.

      CENTER, FORMAT=, and HEADLINE

    Correct Answer
    B. CENTER, HEADLINE, HEADSKIP, and either WIDTH=, SPACING=,or FORMAT=
    Explanation
    The HEADLINE option underlines the headings, and HEADSKIP option skips a line between the headings and the rows in the report. Also, Style is centered, and the column for PRICE is wider than the default.

    Rate this question:

  • 4. 

    To create a summary report that shows the average number of bedrooms and the maximum number of baths for each style of house, which DEFINE statements do you use in your PROC REPORT step?

    • A.

      Define style / center 'Style of/House'; define bedrooms / mean 'Average/Bedrooms'; define baths / max 'Maximum/Baths';

    • B.

      Define style / group; define bedrooms / mean 'Average/Bedrooms'; define baths / max 'Maximum/Baths';

    • C.

      Define style / order; define bedrooms / mean 'Average/Bedrooms'; define baths / max 'Maximum/Baths';

    • D.

      Define style / group; define bedrooms / 'Average/Bedrooms'; define baths /'Maximum/Baths';

    Correct Answer
    B. Define style / group; define bedrooms / mean 'Average/Bedrooms'; define baths / max 'Maximum/Baths';
    Explanation
    To create a summary report, you must define a group variable. To produce the statistics that you want, you must specify the MEAN and MAX statistics for Bedrooms and Baths.

    Rate this question:

  • 5. 

    Which program does not contain an error?

    • A.

      Proc report data=sasuser.houses nowd;    column style bedrooms baths;    define style / order;    define bedbathratio / computed format=4.2;    compute bedbathratio;       bedbathratio=baths.sum/bedrooms.sum; endcomp; run;

    • B.

      Proc report data=sasuser.houses nowd;    column style bedrooms baths BedBathRatio;    define style / order;    define bedbathratio / order format=4.2;    compute bedbathratio;       bedbathratio=baths.sum/bedrooms.sum; endcomp; run;

    • C.

      Proc report data=sasuser.houses nowd;    column style bedrooms baths BedBathRatio;    define style / order;    define bedbathratio / computed format=4.2;    compute bedbathratio;       bedbathratio=baths.sum/bedrooms.sum; endcomp; run;

    • D.

      Proc report data=sasuser.houses nowd;    column style bedrooms baths BedBathRatio;    define style / order;    define bedbathratio / computed format=4.2;    compute bedbathratio;       bedbathratio=baths/bedrooms;    endcomp; run;

    Correct Answer
    C. Proc report data=sasuser.houses nowd;    column style bedrooms baths BedBathRatio;    define style / order;    define bedbathratio / computed format=4.2;    compute bedbathratio;       bedbathratio=baths.sum/bedrooms.sum; endcomp; run;
    Explanation
    Program c correctly specifies a computed variable in the COLUMN statement, defines the variable in a DEFINE statement, and computes values using the form variable-name.statistic in a compute block.

    Rate this question:

  • 6. 

    What output does this PROC REPORT step produce? proc report data=sasuser.houses nowd;    column style sqfeet bedrooms price; run;

    • A.

      A list report ordered by values of the first variable in the column statement

    • B.

      A summary report ordered by values of the first variable in the COLUMN statement

    • C.

      A list report that displays a row for each observation in the input data set and which calculates the SUM statistic for numeric variables

    • D.

      A list report that calculates the N (frequency) statistic for character variables

    Correct Answer
    C. A list report that displays a row for each observation in the input data set and which calculates the SUM statistic for numeric variables
    Explanation
    By default, PROC REPORT displays character variables as display variables. A report that contains one or more display variables has a detail row for each observation in the data set.

    Rate this question:

  • 7. 

    Which of the following programs produces this output?

    • A.

      Proc report data=sasuser.houses nowd;    column style condo range split           twostory price;    define price / mean 'Average Price'; run;

    • B.

      Proc report data=sasuser.houses nowd;    column style price;    define style / group;    define price / mean 'Average Price'; run;

    • C.

      Proc report data=sasuser.houses nowd;    column style price;    define style / across;    define price / mean 'Average Price'; run;

    • D.

      Proc report data=sasuser.houses nowd;    column style price;    define style / across 'CONDO'  'RANCH'           'SPLIT' 'TWOSTORY';    define price / mean 'Average Price'; run;

    Correct Answer
    C. Proc report data=sasuser.houses nowd;    column style price;    define style / across;    define price / mean 'Average Price'; run;
    Explanation
    In this output, the table cells contain a frequency count for each unique value of an across variable, Style. You don't have to specify across variable values in your PROC REPORT step.

    Rate this question:

  • 8. 

    If you submit this program, where does your PROC REPORT output appear? proc report data=sasuser.houses nowd;    column style sqfeet bedrooms price;    define style / group; run;

    • A.

      In the PROC REPORT window

    • B.

      As HTML and/or SAS listing output

    • C.

      Both of the above

    • D.

      Neither of the above

    Correct Answer
    B. As HTML and/or SAS listing output
    Explanation
    In nonwindowing mode, your PROC REPORT output appears as HTML and/or as SAS listing output, depending on your option settings.

    Rate this question:

  • 9. 

    How can you create output with headings that break as shown below?

    • A.

      You must specify the SPLIT= option in the PROC REPORT statement and use the split character in the column headings in DEFINE statements.

    • B.

      You must use the default split character in column headings in DEFINE statements.

    • C.

      You must specify either the width= or the SPACING= attribute in DEFINE statements.

    • D.

      These headings split this way by default.

    Correct Answer
    D. These headings split this way by default.
    Explanation
    By default, columns for character variables are the same as the variable's length, and columns for numeric variables have a width of 9. So these headings split this way by default.

    Rate this question:

  • 10. 

    Suppose you want to create a report using both character and numeric variables.  If you don't use any DEFINE statements in your PROC step,

    • A.

      Your PROC REPORT step will not execute successfully.

    • B.

      You can produce only list reports.

    • C.

      You can order rows by specifying options in the PROC REPORT statement.

    • D.

      You can produce only summary reports.

    Correct Answer
    B. You can produce only list reports.
    Explanation
    Unless you use DEFINE statements to define order variables or group variables, you can't order rows or produce summary reports. However, DEFINE statements are not required in PROC REPORT steps.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 18, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 23, 2013
    Quiz Created by
    Moxleyv

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.