In lesson 2, there are several activities relating to accessing non SAS files (Excel, CSV,...). These files are supposed to be in the data folder that was unzipped at the beginning of the course.
I followed the Entreprise Guide instructions for the data setup, but I can't find any Excel, CSV... files in the folders I unzipped. I've redone the procedure several times, but with the same result. I can only see these two files in the data folder (and not a trace of the necessary files in the other folders either):
Could the original ZIP-file be incomplete?
And as a potential solution/workaround, can I use the files I found in the SAS Studio instructions instead?
Could you double click the 'Autoexec' process flow in the top left, in the Project Tree pane? You should see a grid with SAS programs and some other objects in the second column.
In that grid set up, what order do the SAS programs appear from top to bottom (you may need to scroll down to see the second program)?
If you see the _2 program above the _1 program, then the Autoexec is running the _2 program first, causing the issues. This might have happened when the _2egpg194 and _1egpg194 programs were put into the Project, but rearranging the programs in the Project Tree pane isn't going to influence the order that the programs are run.
If my guess is right, then you should be able to click and drag the _1 program above the _2 program to fix the order, and it should work when you open the project again.
Hi:
In Enterprise Guide, remember that we make the data fresh, every time you start your project, by running the Autoexec Process Flow. We do this because many EG users CANNOT write to a folder on their SAS server. But we know you can write to WORK. Remember the instructions inside the course???
If you do this:
proc contents data=pg1._all_ nods;
run;
Then in EG, in your PROC CONTENTS results, you should see a VERY long temporary location as the Physical location of the PG1 library. You should see storm summary in that location. Now, you could use that very long path name in your code however, that is prone to typos. So instead, as part of the AUTOEXEC process we make you a helper variable called &PATH and in the instructions for any activity where you need a FILEPATH, we tell EG students to use &PATH, as shown below highlighted in yellow:
For your purposes, if you need to code a fully qualified path (not using a LIBNAME statement), then you would use in EG
proc contents data="&path/storm_summary.sas7bdat";
run;
OR, For University Edition in a Virtual Machine:
proc contents data="/folders/myfolders/EPG194/data/storm_summary.sas7bdat";
run;
OR, For SAS OnDemand for Academics using SAS Studio:
proc contents data="/home/userid/EPG194/data/storm_summary.sas7bdat";
run;
Note that &PATH is ONLY used for the Enterprise Guide path, assuming you followed ALL the instructions AND you ran the AUTOEXEC process flow that we instructed you to create as part of the instructions. As shown above, EG students are instructed to use &PATH anytime the code shows the string "FILEPATH" to be replaced. Other students, such as University Edition and OnDemand students use the strings that I have indicated above (assuming they made EPG194/data folders as instructed).
Hope this helps,
Cynthia
Thank you for your answer.
Even when using "&path", I was still getting error messages ("file doesn't exist").
So I went through the process (for the fourth or fifth time) of setting up the data according to the instructions. I thought I had found the problem (something to do with the location of the unzipped files and the EGP file).
But when I reopened the EGP file later, I had the same error messages as before.
And then I finally noticed the real problem. Each time I did the data setup, I never had any error messages when executing the two setup programs. But apparently when I reopen the project afterwards, the autoexec doesn't run correctly: part of the code (specifically the libname statement for creating the PG1 library) isn't executed, which blocks the second part of the setup from running correctly (52 error messages). When I rerun the two programs manually, everything runs as it should, problem solved!
Quite a steep learning curve, I have to say, but I'm glad I'm finally able to move forward with the lessons...
Hi:
That is odd that the AUTOEXEC doesn't work for you but you can submit the programs sequentially. When you see the programs in the AUTOEXEC process flow, does the program name with _1 appear before the program name that starts with _2?? The AUTOEXEC must have the first program run BEFORE the second program, as shown here:
Cynthia
Hi,
Yes, I've checked and the two programs run in the right order. And there are no errors after running the first one, but the second one has 52 errors showing that the previous program didn't actually run correctly:
I tried again this morning: same issue, and yet again running the first program manually and then the second one solves the problem. I think I'll have a word with the SAS reference person in my organisation, since this doesn't seem to be an issue that is caused by user error?
Can you take a screenshot of your window like @Cynthia_sas has? I think if we see the window and programs that might help is diagnose the issue.
Here you go:
What's weird is that from the looks of it you look like you set it up correctly, and you said when you run the programs manually in order everything works correctly?
Yes, that's right, running the programs manually I have no issues and no error messages..
Could you double click the 'Autoexec' process flow in the top left, in the Project Tree pane? You should see a grid with SAS programs and some other objects in the second column.
In that grid set up, what order do the SAS programs appear from top to bottom (you may need to scroll down to see the second program)?
If you see the _2 program above the _1 program, then the Autoexec is running the _2 program first, causing the issues. This might have happened when the _2egpg194 and _1egpg194 programs were put into the Project, but rearranging the programs in the Project Tree pane isn't going to influence the order that the programs are run.
If my guess is right, then you should be able to click and drag the _1 program above the _2 program to fix the order, and it should work when you open the project again.
Great suggestion, they were indeed in the wrong order (despite being added in the right order during set-up). I've rearranged them and now everything runs as it should when autoexecuting!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.