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

Hello folks,

 

I have a SAS question. Please see the attached files. It is said that the answer is A but I want to believe that is is B, because program 3 needs a proc sort before it works. Any inputs?

 

Thanks and regards,




 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
1. Learn how to make fake data and test this
2. Post your pictures directly into the forum, attachments are a pain.
3. Program 3 will error out, not just because of the sort, but because of NO BY statement, so 3 cannot generate the correct answer.

View solution in original post

5 REPLIES 5
Reeza
Super User
1. Learn how to make fake data and test this
2. Post your pictures directly into the forum, attachments are a pain.
3. Program 3 will error out, not just because of the sort, but because of NO BY statement, so 3 cannot generate the correct answer.

Cynthia_sas
SAS Super FREQ
Also, please post the title and page number of the book that you're using. Typically, our exam questions in the Prep Guide have 3-4 unique answers. In your screen shot, it looks like B and D are the same answer. If this is our Prep Guide then we need to add this to the errata.
Cynthia
Alass006
Fluorite | Level 6

Thank you so much for your time and inputs. I did try to copy and paste the question into the window but it was not working. That's why I used the attachment. I believe running a fake data could also be helpful. 

 

Regards,

Cynthia_sas
SAS Super FREQ

 

Hi:

  You did not say where you found the question. Was it in the Certification Prep Guide that we publish? If so, was it in the 4th edition or the 5th edition?

 

  To make the data, so you can figure out the correct answer yourself, all you need is a DATA step program and the patience to make the datalines for input, as shown below:

 

data work.orders;
infile datalines dlm=',';
input Order_Date : mmddyy. Customer_ID $ Order_Total;
return;
datalines;
01/01/2011,B4523,52.30
01/02/2011,A2356,104.20
01/03/2011,C3467,27.40
01/04/2011,B4523,260.40
01/05/2011,A2356,74.54
;
run;

 

Then, once you have WORK.ORDERS, you can type and submit all 3 programs to see which ones work or don't work and why. If you are studying in the Certification Prep Guide, you should find a section that discusses using DATALINES as one method of creating a SAS table.

 

Cynthia

Alass006
Fluorite | Level 6
Thanks Cynthia, I found it on exam collection.
I will try to run the data you provided using the 3 programs and see the
best options.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 959 views
  • 3 likes
  • 3 in conversation