Hello,
I was completing the Challenge Practice for Lesson 5 in SAS Programming 1 called "Identifying the Top Three Extreme Values with the Output Statistics". I continue to receive an error message saying "Variable PARKNAME not found" even when I run answer code listed in the solution.
Moreover, the only time the code runs to the output data tab is when I add a data step and even so, "TotalVisitors" and "Visitors" column are blank.
My questions are:
1. Can you please explain why I am receiving "Variable PARKNAME not found" error message?
2. Can you please explain why the code is only running when I add a data step?
Thank you.
The proposed solution:
Error message when running the proposed solution
Only time the code runs is when I add a data step
Check to see if PARKNAME is a valid variable in the data set:
proc contents data=pg1.np_multiyr;
run;
You are using the NOPRINT option, so the PROC MEANS call does not produce any output. Perhaps that is why you think it is not running? Clearly it is running because it is giving you an error. However, it is not creating an output data set because of the error, so fix the error first.
I am surprised that you are not seeing a WARNING such as
WARNING: The data set WORK.TOP3PARKS may be incomplete. When this step was stopped there were 0
observations and 0 variables.
Double-check the log.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.