BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Zacc
Fluorite | Level 6

Dear all,

 

Regarding "SAS 9.4 Base Programming Performance-Based Exam" practice examination, I have the following code which produces the same result as the solution code which SAS provided:


libname results "....../Cert/output";
Proc sort data=cert.input08a out=sorted_08a;
by ID;
run;

 

Proc sort data=cert.input08b out=sorted_08b;
by ID;
run;


Data results.match08 results.nomatch08(drop=ex: );
merge sorted_08a(in=a8) sorted_08b(in=b8);
  by ID;
  if a8 and b8 then output results.match08;
  else output results.nomatch08;
run;

 

However, to answer question 3 ("How many observations (rows) are in results.match08?") and 5 ("How many observations (rows) are in results.nomatch08?"), I got 51 for the former, and for the later, 1151. More so, the provided solution gave the same results as the referenced figures. However, 1200 and a 2 where given in the solutions as the right answers. I have read through the log and the contents which resulted from the proc procedure but couldn't deduce how the figures where derived. 

I should be most grateful for your insights.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Mark2010
SAS Employee

Hi @Zacc 

 

FYI (The link in your post is unique to you and no one else will be able to access it.)

 

However, I attempted to duplicate your result with my copy of the practice exam, and I was unable to get your answers. I obtained the same answers as the practice exam key. If your code matches the solution code, then I think it is possible that the input data sets that you are using have been corrupted and you may want to download them again to see if it makes a difference. (Also, this is why the source data sets are read-only protected in the actual certification exam: to prevent this type of corruption from affecting a candidate's exam)

View solution in original post

4 REPLIES 4
ballardw
Super User

No data, no code to compare, no actual example of the supposed solution: No answer.

 

You really need to provide a link or the exact version of the trial exam. Sometimes test questions get updated and answer keys don't. Some sources of "practice examinations" don't have very good quality control. Without knowing ever detail of exactly which one this is a dart board.

Zacc
Fluorite | Level 6

My apologies, here are the corresponding links:

 

Link to the exam question: https://vle.sas.com/mod/quiz/attempt.php?attempt=282358&cmid=82041&page=6

 

"Write a program that will use a SAS DATA Step to:

 

    • Combine data sets cert.input08a and cert.input08b by matching values of the ID variable.
    • Write only observations that are in both data sets to a new data set named results.match08.
    • Write all other non-matching observations from either data set to a new data set named results.nomatch08.
    • Exclude all variables that begin with "ex" from results.nomatch08.

 

Run the program and use the results to answer the next 4 questions."

 

 

 

Link to the corresponding solutions as provided by SAS: 

Q3.JPG

 

Answer: 1200

SAS code that could be used to solve this project:

proc sort data=cert.input08a out=work.input08a;
  by ID;
run;
proc sort data=cert.input08b out=work.input08b;   by ID; run;
data results.match08 results.nomatch08 (drop=ex: );   merge work.input08a (in=a) work.input08b (in=b);   by ID;   if a and b then output results.match08;   else output results.nomatch08; run;
proc contents data=results.match08; run;
proc contents data=results.nomatch08; run;

Q5.JPG

 

Mark2010
SAS Employee

Hi @Zacc 

 

FYI (The link in your post is unique to you and no one else will be able to access it.)

 

However, I attempted to duplicate your result with my copy of the practice exam, and I was unable to get your answers. I obtained the same answers as the practice exam key. If your code matches the solution code, then I think it is possible that the input data sets that you are using have been corrupted and you may want to download them again to see if it makes a difference. (Also, this is why the source data sets are read-only protected in the actual certification exam: to prevent this type of corruption from affecting a candidate's exam)

Zacc
Fluorite | Level 6

Thank you so very much @Mark2010 for your insight. Indeed, the input data sets which I used were the culprit. After a new upload, I finally obtained the same answers as those provided in the practice key. 

 

once again, thanks.

Welcome to the Certification Community

 

This is a knowledge-sharing community for SAS Certified Professionals and anyone who wants to learn more about becoming SAS Certified. Ask questions and get answers fast. Share with others who are interested in certification and who are studying for certifications.To get the most from your community experience, use these getting-started resources:

Community Do's and Don'ts
How to add SAS syntax to your post
How to get fast, helpful answers

 

Why Get SAS Certified.jpg

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2407 views
  • 1 like
  • 3 in conversation