Business Intelligence Quiz: Reading SAS Data Sets Overview

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Moxleyv
M
Moxleyv
Community Contributor
Quizzes Created: 38 | Total Attempts: 21,992
| Attempts: 257 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. If you submit the following program, which variables appear in the new data set? data work.cardiac(drop=age group);    set clinic.fitness(keep=age weight group);    if group=2 and age>40; run;

Explanation

The variables Age, Weight, and Group are specified using the KEEP= option in the SET statement. After processing, Age and Group are dropped in the DATA statement.

Submit
Please wait...
About This Quiz
Business Intelligence Quiz: Reading SAS Data Sets Overview - Quiz

In the study of computing, the term “Statistical Analysis System” (or SAS) refers to a software suite developed by the SAS Institute for use in the fields of... see moreadvanced analytics, multivariate analysis, business intelligence, predictive analytics, and data management. What do you know of SAS and how its data is recorded? see less

2. Which of the following programs correctly reads the data set Orders and creates the data set FastOrdr?

Explanation

You specify the data set to be created in the DATA statement. The DROP= data set option prevents variables from being written to the data set. Because you use the variable OrdrTime when processing, you cannot drop OrdrTime in the SET statement. If you use the KEEP= option in the SET statement, then you must list OrdrTime as one of the variables to be kept.

Submit
3. The DATA step executes:

Explanation

The DATA step executes once for each observation in the input data set. You use the POINT= option with the STOP statement to prevent continuous looping.

Submit
4. Assuming that the data set Company.USA has five or more observations, what is the result of submitting the following program? data work.getobs5(drop=obsnum);    obsnum=5; set company.usa(keep=manager payroll) point=obsnum;    output;    stop; run;  

Explanation

By combining the POINT= option with the OUTPUT and STOP statements, your program can write a single observation to output.

Submit
5. What is the result of submitting the following program? data work.addtoend;    set clinic.stress2 end=last;    if last; run;

Explanation

This program uses the END= option to name a temporary variable that contains an end-of-file marker. That variable _last_ is set to 1 when the set statement reads the last observation of the data set.

Submit
6. Which of the following Statements is false about BY-group processing?      When you use the BY statement with the SET statement:

Explanation

When you use the BY statement with the SET statement, the DATA step creates the temporary variables FIRST. and LAST. They are not stored in the data set.

Submit
7. There are 500 observations in the data set Usa.  What is the result of submitting the following program? data work.getobs5(drop=obsnum);    obsnum=5;    set company.usa(keep=manager payroll) point=obsnum;    stop; run;

Explanation

The DATA step writes observations to output at the end of the DATA step. However, in this program, the STOP statement stops processing before the end of the DATA step. An explicit OUTPUT statement is needed in order to produce observations.

Submit
8. Which of the statements is true regarding direct access of data sets?

Explanation

The END= option and POINT= option are incompatible in the same SET statement. Use one or the other in your program.

Submit
9. At the start of DATA step processing, during the compilation phase, variables are created in the program data vector (PDV), and observations are set to:

Explanation

At the bottom of the DATA step, the compilation phase is complete and the descriptor portion of the new SAS data set is created. There are no observations because the DATA step has not yet executed.

Submit
10. There is no end-of-file condition when you use direct access to read data, so how can your program prevent a continuous loop?

Explanation

To avoid a continuous loop when using direct access, either include a STOP statement or use programming logic that checks for an invalid value of the POINT= variable. If SAS reads an invalid value of the POINT= variable, it sets the automatic variable _ERROR_ to 1. You can use this information to check for conditions that cause continuous processing.

Submit
View My Results

Quiz Review Timeline (Updated): Feb 15, 2023 +

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

  • Current Version
  • Feb 15, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 01, 2013
    Quiz Created by
    Moxleyv
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
If you submit the following program, which variables appear in the new...
Which of the following programs correctly reads the data set Orders...
The DATA step executes:
Assuming that the data set Company.USA has five or more observations,...
What is the result of submitting the following program?...
Which of the following Statements is false about BY-group...
There are 500 observations in the data set Usa.  What is the...
Which of the statements is true regarding direct access of...
At the start of DATA step processing, during the compilation phase,...
There is no end-of-file condition when you use direct access to read...
Alert!

Advertisement