I was getting errors when I tried to set up the data for the course. The first code ran with no errors, but the second one was giving me errors like:
ERROR: Libname PG1 is not assigned.
WARNING: Apparent symbolic reference PATH not resolved.
ERROR: Physical file does not exist, C:\WINDOWS\system32\&path\data\class_birthdate.csv.
ERROR: Libname XL is not assigned.
Please make sure you're following the instructions for your installation of SAS.
The video's here are possibly more clear.
What type of SAS installation do you have?
Thank you for the reply. I did follow the instructions (https://vle.sas.com/pluginfile.php/257520/mod_scorm/content/11/setup_eg.htm).
I'm using SAS EG5.1.
Can you please supply the code you executed and the subsequent log?
It looks as if a variable called &Path was meant to be set prior to running the code, but is wasn't, so '&path' is parsed as a literal string rather than a macro variable. Because the path was not set, it defaults to C:\WINDOWS\system32.
But if you could supply the code & log, we can be more accurate regarding the error.
Hi, I am having a similar issue with EG7.13 , I set it up according to the new instructions in the tutorial and followed the steps to the letter. but when I get to lesson 2. Accessing data : understanding SAS data , Activity 2
I wrote this code :
proc contents data= "&path storm_summary.sas7bdat";
run;
which is suppose to automatically indicate the storm summary table, instead it just display this message in the log
proc contents data= "&path PG1.storm_summary.sas7bdat";
ERROR: The physical file name "/vw/data/saswork/SAS_work197600000513_bal2541prd001/SAS_workAEB200000513_bal2541prd001 PG1.storm_summary.sas7bdat" is too long.
27 run;
Note: I did not set a path previously ( as I don't know how yet and it wasn't in the instructions) as it was done automatically by the EPG194-1 and 2 in the Autoexec process
Thank you in advance for your help/ feed back,
Regards,
Mazen
Yours could be two issues.
First thing I see is you are missing a '/' after path. Try this
proc contents data= "&path/storm_summary.sas7bdat";
run;
If this doesn't work you might not have the data since all the data is being created temporarily. You can see my other comment to confirm it is always being set up.
Let me know if this works!
- Peter
Hello,
I am not sure what I should replace "&path" with. Here's my attempt :
proc contents data="H:/EPG1V2_EG/data/storm_summary.sas7bdat";
run;
What is wrong here ? Thank you
I can only attach the log, the code is too big. Here's the link for code: https://vle.sas.com/pluginfile.php/257520/mod_scorm/content/11/coursedata_wk.zip
After you unzip it, you should find egpg194_2.sas in the "data" folder.
Thanks for the help!
@Cynthia_sas - can I suggest a little macro logic prior to assigning any macro variable to throw a well-worded error if the variable if not set? A nice big capitalised "ERROR:" message might get the user attention and assist in rectifying the issue. Just a thought..
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.
Find more tutorials on the SAS Users YouTube channel.