BookmarkSubscribeRSS Feed
stippur
Obsidian | Level 7

Write a SAS program that will:

 

 

    • Create output data set results.output27a as a subset of cert.input27 where the country variable's value is “US” (any variation of case, such as US or us).
    • Sort results.output27a:
      • first by the variable state in ascending order
      • then by Postal_Code in descending order
      • and finally by employee_ID in ascending order.

They are asking what employee_ID is for obs 100? They have answer as 120781. I am getting answer as 121030. Can someone please help me? Thanks. I am prepping for the exam.

7 REPLIES 7
Mark2010
SAS Employee
the practice test posts example solution code in addition to the answer. What is different between that code and your code ?
stippur
Obsidian | Level 7

I am not seeing a difference between my code and what was given. I will have another look. Thanks.

ballardw
Super User

Show your code.

 

ed_sas_member
Meteorite | Level 14

Hi @stippur 

Did you put :

- a where clause on upcase(country) = "US" to be sure to retrieve "US", "Us" and "us" values?

- the following by statement: by state descending Postal_code employee_ID;

 
Best,
stippur
Obsidian | Level 7

Thank you for your help. I did put in the upcase stmt correctly along with the sort stmt.

ballardw
Super User

I repeat

Show your code. Otherwise we have to guess line by possible line what you might have gotten wrong

And it would be best to show from the log along with any notes.

Copy the log with the code and notes and paste into a code box opened on the forum with the </> icon to preserver formatting.

 

That will confirm what was actually submitted. We get "code" all the time that eventually turns out not to be what was actually submitted or not paying attention to warnings and even errors.

stippur
Obsidian | Level 7

Thanks I was able to figure out the issue.

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

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 2900 views
  • 0 likes
  • 4 in conversation