BookmarkSubscribeRSS Feed
mohamedk
Fluorite | Level 6

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

10 REPLIES 10
Reeza
Super User
Is EG running locally or on a server?

Try running the following (it won't work but the error will help answer the question).

ods excel file="C:\Users\Mohamed\Downloads\coursefiles\EPG1V2\data\demo.xlsx";

proc print data=sashelp.class;
run;

ods excel close;
mohamedk
Fluorite | Level 6

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.

 

Reeza
Super User
And does your libname statement still not work?

What about if it's hardcoded?

libname pg 'C:\Users\Mohamed\Downloads\coursefiles\EPG1V2\data\';
Cynthia_sas
SAS Super FREQ

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

mohamedk
Fluorite | Level 6

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.

 

Cynthia_sas
SAS Super FREQ
Hi:
Sorry, I did not focus on the fact that you are using Enterprise Guide. Do you have read/write access to your C: drive from Enterprise Guide.

One of the things you may have noticed is that there are NOT any Enterprise Guide instructions in the EPG1V2 set up. That's because we find that typically EG students cannot read from or write to their C: drives unless they are running a local copy of SAS.

Usually, if EG is on a server, they need to do this:
1) find a server location with write access -- usually involves their SAS Administrator and then the zip file contents need to be uploaded to the server folder;
or
2) run a program that writes all the course data to the WORK library. This is what we did in the prior version of Programming 1 (the EPG194 version). However, the course was put on the web for registrations without the Enterprise Guide instructions. So unless you have an alternate method of using SAS or you can get a folder with write access on the server or on a network drive you'll need to wait until we have specific Enterprise Guide instructions to write to the WORK location. We expect the instructions to be ready in the next few days.

Thanks, in advance, for your patience,
Cynthia
amreshcg
Calcite | Level 5

Hi Cynthia,

For https://vle.sas.com/mod/scorm/player.php?a=8494&currentorg=ORG-EPG1V2&scoid=19198

SAS Programming 1: Essentials  course university edition setup requires to run this code:

 

/***********************************************/
74 /* In the line of code below, replace FILEPATH */
75 /* with the path to your EPG1V2/data folder */
76 /***********************************************/
77
78 %let path= /folders/myfolders/EPG1V2/data;
79
80 /**********************************************/
81 /* DO NOT EDIT THE CODE BELOW */
82 /**********************************************/
83
84
85
86 libname PG1 "&path";
NOTE: Library PG1 does not exist
 
Seems this problem is not solved yet and wrong instruction is given 🙂
 



 

Reeza
Super User
Could please provide more information? The instructions look correct to me.

Did you download the data set and unzip it in the myfolders folder as instructed? Which part of the file path is incorrect?

The only exception to the instructions below for me, was my Mac automatically unzipping the file so I had to move the whole folder to myfolders.

Task 1 of 3: Copy the course files to your computer.

Open this ZIP file and extract the files to the SASUniversityEdition/myfolders folder on your computer. The unzip process creates a folder named EPG1V2 that includes two SAS programs (setup.sas and createdata.sas) and five sub-folders: activities, data, demos, output, and practices.
amreshcg
Calcite | Level 5
1. In the *Server Files and* *Folders* panel, expand *My Folders*.

2. Navigate to and expand the *EPG1V2* folder.

Here you cant navigate at all//
Reeza
Super User

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       

Welcome to the Certification Community

 

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

 

Why Get SAS Certified.jpg

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 3650 views
  • 0 likes
  • 4 in conversation