Hi Everybody,
So i Googled a few topics regarding this issue and I honestly can't seem to figure out what I'm doing wrong. I'm using SAS EG7.1 Windows application and get the error below:
24
25 GOPTIONS ACCESSIBLE;
26 /***********************************************/
27 /* In the line of code below, replace FILEPATH */
28 /* with the path to your EPG1V2/data folder */
29 /***********************************************/
30
31 %let path=C:\Users\Mohamed\Downloads\coursefiles\EPG1V2\data\;
32
33 /**********************************************/
34 /* DO NOT EDIT THE CODE BELOW */
35 /**********************************************/
36
37 libname PG1 "&path";
NOTE: Library PG1 does not exist.
38
Hi @Reeza
That worked, got a results output.
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=PNG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 FILENAME EGSR TEMP;
15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16 STYLE=HtmlBlue
17 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
18 NOGTITLE
19 NOGFOOTNOTE
20 GPATH=&sasworklocation
21 ENCODING=UTF8
22 options(rolap="on")
23 ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24
25 GOPTIONS ACCESSIBLE;
26
27 ods excel file="C:\Users\Mohamed\Downloads\coursefiles\EPG1V2\data\demo.xlsx";
28
29 proc print data=sashelp.class;
30 run;NOTE: There were 19 observations read from the data set SASHELP.CLASS.
Hi:
The challenge is that &PATH is created with a full path down to the data folder level in the data creation program The challenge is that when &PATH is then used in a program reference like this -- if the model syntaxl also includes the data folder:
datafile="&path/data/filename.ext" or
file="&path/output/filename.ext"
then the macro variable resolution results in a Physical File not found message.
A fully correct path should work for University Edition:
datafile="/folders/myfolders/EPG1V2/data/filename.ext"
or
file="/folders/myfolders/EPG1V2/output/filename.ext"
or
libname pg1 "/folders/myfolders/EPG1V2/data";
And for SAS OnDemand for Academics, a fully correct path should work
datafile="/home/<yourUserID>/EPG1V2/data/filename.ext"
or
file="/home/<yourUserID>/EPG1V2/output/filename.ext"
or
libname pg1 "/home/<yourUserID>/EPG1V2/data";
We are aware that the instructions tell students to use &PATH in several programs, but there was a disconnect in the instructions and how we populate &PATH and we are working to update the instructions.
The challenge is that for the data creation program, THIS is the correct %LET statement:
%let path=/folders/myfolders/EPG1V2/data;
or
%let path=/home/<yourUserID>/EPG1V2/data;
But AFTER the data is created, then the SETUP.SAS or LIBNAME.SAS program will need to change to THIS instead (until we correct the issue):
%let path=/folders/myfolders/EPG1V2;
libname pg1 "&path/data";
or
%let path=/home/<yourUserID>/EPG1V2;
libname pg1 "&path/data";
Thanks for your patience,
Cynthia
Honestly not sure what I'm doing wrong - I used the below and get the same error.
/***********************************************/ /* In the line of code below, replace FILEPATH */ /* with the path to your EPG1V2/data folder */ /***********************************************/ %let path=c:\Users\Mohamed\Downloads\coursefiles\EPG1V2; /**********************************************/ /* DO NOT EDIT THE CODE BELOW */ /**********************************************/ libname pg1 "&path\data"; libname pg 'C:\Users\Mohamed\Downloads\coursefiles\EPG1V2\data\';
Error:
24
25 GOPTIONS ACCESSIBLE;
26
27 %let path=c:\Users\Mohamed\Downloads\coursefiles\EPG1V2;
28
29 /**********************************************/
30 /* DO NOT EDIT THE CODE BELOW */
31 /**********************************************/
32 libname pg1 "&path\data";
NOTE: Library PG1 does not exist.
33
34
35 libname pg 'C:\Users\Mohamed\Downloads\coursefiles\EPG1V2\data\';
NOTE: Library PG does not exist.
Hi Cynthia,
For https://vle.sas.com/mod/scorm/player.php?a=8494¤torg=ORG-EPG1V2&scoid=19198
SAS Programming 1: Essentials course university edition setup requires to run this code:
Post an image. This is what happens and what I get when I run the code. Note that your log doesn't seem to print the path for some reason? I assume you dumped the zip file into myfolders from your computer?
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
68
69 /***********************************************/
70 /* In the line of code below, replace FILEPATH */
71 /* with the path to your EPG1V2/data folder */
72 /***********************************************/
73
74 %let path=/folders/myfolders/EPG1V2/data;
75
76 /**********************************************/
77 /* DO NOT EDIT THE CODE BELOW */
78 /**********************************************/
79
80 libname PG1 "&path";
NOTE: Libref PG1 was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders/EPG1V2/data
81
82
83
84 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
94
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
Ready to level-up your skills? Choose your own adventure.