Exam A00-211 All QuestionsBrowse all questions from this exam
Question 4

Given the SAS data set SASDATA TWO:

SASDATA TWO -

X Y -

-- --

5 2

3 1

5 6

The following SAS program is submitted:

data sasuser.one two sasdata.three;

set sasdata two;

if x = 5 then output sasuser.one;

else output sasdata two;

run;

What is the result?

    Correct Answer: D

    The given SAS code attempts to write observations to datasets sasuser.one and sasdata.two. However, there are syntax issues in the code. The dataset sasuser.one is mentioned, but the dataset sasdata.two is also referenced as both a source and destination, which is not handled properly in the syntax. Additionally, sasdata.two is being used for output without it being clearly defined in the start of the code structure. Therefore, no data sets are output.

Discussion
Misty2287Option: D

D is the correct answer.

Mandar77

All answers for this question are not correct or something is missing in question. I tested the logic with following example data one two three; set sashelp.cars; if type="Sedan" then output one; else output two; run; one : contains rows based on if condtion two: contains all other rows three: Does not have any rows

nbavOption: D

D is the correct answer. The code produces and error

KleinstoneOption: D

if the question is output sasuser.two; the choice is D, no output since sasuser.two is not defined in the code.