DATA Step, Macro, Functions and more

merging datasets

Reply
Contributor
Posts: 31

merging datasets


data temp;
set test1(in = a) /* 2 observations*/
test2(in=b); /* 5 observations*/
if a and b;
run;
How many observations will be there in temp dataset?
a.) 2
b.) 5
c.) 7
d.) 0
Answer: 0 

Please explain the reason behind this.

Super User
Posts: 19,770

Re: merging datasets

Posted in reply to Bulleride

@Bulleride I'm going to assume you're studying for certification? 

 

I've noticed quite a few questions that you've posted on here. I highly suggest that you do more research and google these issues rather than expect to get all your answers from here. Also, if you purchase the SAS Certification guide the examples have worked solutions, since I'm assuming you're working off free test bank questions that you found online somehow, which don't have worked solutions.

Contributor
Posts: 31

Re: merging datasets

@Reeza Yes! I am studying for the same. Went through the SAS base cert book and now solving some questions. Now is almost the time for me and hence asking all my doubts Smiley Happy I'll buy your suggestion to search for these online. Thanks Smiley Happy
Super User
Posts: 5,424

Re: merging datasets

Posted in reply to Bulleride

Also, take your time to perform these examples in a SAS session. You'll learn much more from doing it, rather than just reading and asking.

Good luck anyway!

Data never sleeps
Contributor
Posts: 31

Re: merging datasets

Smiley Very Happy Thanks
Super User
Posts: 10,018

Re: merging datasets

Posted in reply to Bulleride

There is not  1  1 , only  1 0 OR 0 1 .

Ask a Question
Discussion stats
  • 5 replies
  • 251 views
  • 2 likes
  • 4 in conversation