Hi,
I downladed SAS university edition and I get this error while running the practice programs in Lesson 2: Working with SAS Programs. I defined the orion library by creating ecprg193 setup. But I still get this error.
Please show the entire code along with the error.
data work.newcountry; length Country_Code $ 2 Country_Name $ 48; infile "&path/country.dat" dlm='!'; input Country_Code $ Country_Name $; run; proc print data=work.newcountry; run;
The error is as follows:
And the code assigning the PATH macro variable?
Note the path is going to be case sensitive. So if you named the folder Ecprg193 then that does not match ecprg193.
What is the code assigning the path?
This is the code I used for the setup
%let path=/folders/myfolders/ecprg193;
libname orion "&path";
And ecprg193 is in lowercase. I havent used Ecprg193 or anyother since I know it is case sensitive.
When you run your setup program, you should see the note in the log:
NOTE: Libref ORION was successfully assigned
Does this show up?
Are you sure you created the folder you are referencing in that location?
Yes it does show up.
This is what I got in the log-
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 %let path=/folders/myfolders/ecprg193;
57 libname orion "&path";
NOTE: Libref ORION was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders/ecprg193
58
59 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
71
I did not find any error.
Post a screenshot of that folder. Also, does the folder contain the file referenced?
Can you open it as a text file?
In SAS UE, go to the Server Files and Folders Pane.
Find the ECPRG folder, navigate to the file. Right click the file and select properties. You'll get the path to the file. Use that in your code.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.