SAS Report Generation & Output 1 — Questions and Answers
Question 1: Which SAS procedure is specifically designed to create tabular summaries with automatic subtotals and grand totals?
- PROC PRINT
- PROC REPORT
- PROC TABULATE (Correct answer)
- PROC MEANS
Correct answer: PROC TABULATE
PROC TABULATE is designed to produce tables of descriptive statistics organized in rows and columns with automatic subtotals and grand totals.
Question 2: What does ODS stand for in SAS?
- Output Data System
- Output Delivery System (Correct answer)
- Organized Data Structure
- Online Data Service
Correct answer: Output Delivery System
ODS stands for Output Delivery System, which controls how SAS procedure output is formatted and delivered to various destinations.
Question 3: Which ODS statement captures procedure output tables as SAS datasets for further processing?
- ODS TRACE
- ODS SELECT
- ODS OUTPUT (Correct answer)
- ODS DATASET
Correct answer: ODS OUTPUT
The ODS OUTPUT statement captures named ODS output objects and saves them as SAS datasets for downstream analysis.
Question 4: In PROC REPORT, which construct is used to define computed variables and perform calculations within a report?
- DEFINE statement with COMPUTED usage
- COMPUTE block (Correct answer)
- COLUMN statement
- CALCULATE statement
Correct answer: COMPUTE block
The COMPUTE block in PROC REPORT defines computed variables and performs calculations, executing once per row or group break in the report.
Question 5: Which option in the PROC PRINT statement suppresses the display of observation numbers in the output?
- NOOBS (Correct answer)
- NONUM
- SUPPRESS
- NONUMBER
Correct answer: NOOBS
The NOOBS option in PROC PRINT suppresses the 'Obs' column that displays sequential observation numbers in the output.
Question 6: What is the primary purpose of the ODS TRACE ON statement?
- To debug macro variable resolution in output
- To identify the names and paths of ODS output objects written to the log (Correct answer)
- To trace DATA step execution line by line
- To monitor procedure CPU and memory usage
Correct answer: To identify the names and paths of ODS output objects written to the log
ODS TRACE ON writes the names, labels, and paths of ODS output objects to the SAS log, helping identify objects for use with ODS OUTPUT or ODS SELECT.
Question 7: In the PROC TABULATE TABLE statement, which operator nests one variable or statistic within another?
- Comma (,)
- Plus (+)
- Slash (/)
- Asterisk (*) (Correct answer)
Correct answer: Asterisk (*)
The asterisk (*) in PROC TABULATE nests variables or associates statistics with classification variables within a dimension of the table.
Which SAS procedure is specifically designed to create tabular summaries with automatic subtotals and grand totals?