BookmarkSubscribeRSS Feed
zhangrachel0118
Calcite | Level 5

Create the np_sort table that contains data for national parks. You want the data sorted by regional code and decreasing numbers of daily visitors. If necessary,start SAS before you begin.

Reminder: If you restarted your SAS session, you must open and submit the libname.sas program created in Activity 2.04 to access your course files.

  1. Open p103p08.sas from the practices folder.

  2. Modify the PROC SORT step to read pg1.np_summary and create a temporary, sorted table named np_sort.

  3. Add a BY statement to order the data by Reg and descending DayVisits values.

  4. Add a WHERE statement to select Type equal to NP.

  5. Submit the program and view the output data.

How many rows are in the np_sort table?

 

I cannot get the right answer for this question, and I am not sure if I am incorrect with the activity 2.04 or the coding for np_sort, and the error said that File WORK.NP_SUMMARY.DATA does not exist and Library PG1 does not exist.

2 REPLIES 2
Tom
Super User Tom
Super User

Read the REMINDER in what you just posted.

Did you run the libname.sas program?  Did it work?  If so it should have created the PG1 libref where you could find the input dataset.

Cynthia_sas
SAS Super FREQ
Hi:
I just posted some examples of how to construct the LIBNAME statement in your other post asking about the LIBNAME statement activity.
Cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 514 views
  • 0 likes
  • 3 in conversation