A00-211 Exam QuestionsBrowse all questions from this exam

A00-211 Exam - Question 29


Given the SAS data set WORK.ONE:

And the SAS data set WORK.TWO:

The following program is submitted:

What is the first observation in the SAS data set WORK.BOTH?

Show Answer
Correct Answer: A

When the `SET` statement is used with the `BY` statement in the provided SAS program, it interleaves the two data sets (WORK.ONE and WORK.TWO) based on the common variable 'Id'. However, it's important to note that this is not a merge operation, so variables from the two data sets are not combined. Instead, the rows are ordered by 'Id' and taken as they appear in each data set sequentially. Here, the first row from WORK.ONE has 'Id' as 111 and 'Char1' as A, and this should be the first observation in the interleaved data set WORK.BOTH, making the correct answer option A.

Discussion

5 comments
Sign in to comment
Kleinstone
Jan 4, 2021

the answer should be A. this is not a merge.

mhminkov
Jun 4, 2021

yes, A, .. this is interleaving

Mandar77
Jun 21, 2022

data one; infile datalines; input id char1; datalines; 111 10 158 20 329 30 644 40 ; ANSWER is A.. it gives 111 10 as a first row

DEAWS
Feb 13, 2024

Correct Answer is :A

e6e3fecOption: A
Nov 27, 2024

With SET statement, yes it's A.