BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sbyfield
Fluorite | Level 6
Never mind. Another SAS Pro had suggested on another post to right click on the file in my directory in SAS Studio and go to properties and copy the path from there. That worked great.
Panagiotis
SAS Employee

@HFJL, it looks like the second program that is creating all your data cannot find the path macro variable to create the data. The path macro variable is telling the second program where to create everything.

 

Make sure you run the first program egpg194_1.sas, then without closing out of Enterprise Guide run the second program egpg194_2.sas.

 

The Enterprise Guide setup will create the data you need for this course in a temporary folder called work because the location of server will differ for all individuals.Task 3 specifies how to automatically create these data files every time you want to run through the course. You will learn more about this temporary folder in Lesson 3.

 

If you complete task 2 correctly it should look something like this:

 

 

test.png

 

Task 3 is important. In task 3 you are telling SAS to create all of these necessary files every time you Enterprise Guide and want to run through the course. It essentially is recreating all the data files for you to use and telling SAS where these files are. Again they are temporary, so when you close Enterprise Guide all the data is deleted and you have to recreate all these files when you open up Enterprise Guide. Task 3 will automate this for you.

 

Some screenshots below after you follow all steps in Task 3.

 

Task 3, steps 1 and 2: Rename the process flow to 'Autoexec' and add a new process flow:

autoexec.png

 

Task 3 Step 3, save the project to your computer:

save.png

 

 

Now when you want to run through the course you have to open the EPG194.egp project. When you open this project it will automatically create all the necessary files and connections for your to work on the course. When you open it, you will be asked to run the Autoexec file, it will look like this:

 

run autoexec.png

 

Make sure to run this.

 

 

Hope this helps. Please keep us posted.

 

- Peter

HFJL
Fluorite | Level 6

Hi Peter,

 

I have everything in your screenshots, but I'm still getting errors in the log.

 

image.pngimage.png

Reeza
Super User
That's possibly an issue with your license. Your version of EG doesn't support SAS/Access or was installed incorrectly without that feature. This means you cannot export to an XLSX file or import from an XLSX file.
Cynthia_sas
SAS Super FREQ
Hi:
It would be useful to know what version of SAS you're using with your Enterprise Guide. This blog explains that the XLSX engine should be available with SAS 9.4 maintenance release 2: https://blogs.sas.com/content/sasdummy/2015/05/20/using-libname-xlsx-to-read-and-write-excel-files/

Cynthia
Panagiotis
SAS Employee

Yes, it looks like it's the xlsx engine that is causing the problem.

 

The program you are running to create your data files is creating both SAS tables and other raw data files for you to use in the course. I can see from your image the SAS files are being created, but the Excel files are not. I think the best option for you will be to follow the Setup Instructions for SAS OnDemand for Academics: SAS Studio. This will allow you to run through the entire course using SAS Studio in the cloud.

 

Link: Sign up here SAS® OnDemand for Academics

 

Link: SAS OnDemand for Academics: SAS Studio Setup Instructions from the course page.

 

 

 

There is nothing to install, just an account to make and you will have to upload the data there. While you will be using SAS Studio to program, the concepts you learn will be the same when programming Enterprise Guide. 

 

Keep us posted.

 

- Peter

 

 

 

 

Cynthia_sas
SAS Super FREQ

Hi:

  I looked at the log file that you attached to a previous posting and I see something that bothers me. In your posted LOG, you had many lines like this:

windows_system32_loc.png

 

And what bothers me is that I was told NEVER to try to put my own files in the WINDOWS folders. That the SYSTEM32 folder was for applications and not for me to use.

 

In fact, if I try to just make an empty folder in the System32 location, my Windows 10 will deny access:

mysystem32_access_denied.png

 

  And I wonder whether there are 2 things wrong. 1) somehow you had issues with the Program #1 and submitted Program #2 anyway and/or 2) you said that you unzipped the zip archive to your Desktop and I wonder whether that is causing write access issues.

 

When you are following the EG instructions, you should NOT be writing the data files to your C: drive (unless you work location is on your C: drive). However, as far as I know, SAS does not make your WORK location underneath the Windows\System32 folder. Typically, the location for WORK is in a WRITE access location.

 

  If you start a fresh session of Enterprise Guide and you open an empty program window (File --> New --> Program) and you submit this code:

%put My WORK location is: %SYSFUNC(pathname(WORK));

 

What do you see in the LOG???

 

For example, when I submit that code in my EG talking to local SAS, here's what I see:

my_work_loc.png

and when I am using EG talking to SAS on my cloud server, I see this:

server_work.png

 

This is why it concerns me to see a C:\WINDOWS\System32 in any part of your path in the error message, and why I am curious what your WORK location path is.

 

In a fresh EG session, when you do this

%put My WORK location is: %SYSFUNC(pathname(WORK));

 

What do you see in the LOG???

 

Thanks, in advance,

Cynthia

 

PremS
Obsidian | Level 7
Cynthia, my Enterprise Guide does this as well. As Andrew mentioned, if I don't start the file location with the name of the drive (e.g. C:/), then it defaults to C:\WINDOWS\system32\. I do have SAS on a local Windows Operating system, so I don't know if this would cause worry if HFJL is running SAS on a Linux Server.

If you use the following code, I think you should get the same errors, one for the physical location not existing and one for having insufficient permissions to write to the location.

ods csvall file="&mypath/cars.csv";
ods csvall file="cars2.csv";
proc print data=sashelp.cars noobs;
run;
ods _all_ close;
Cynthia_sas
SAS Super FREQ
Hi, Prem:
I always use a fully qualified path when I'm in EG, so I haven't noticed this. But I'll test it out. At any rate, that implies to me that the reference to &path was not correctly set. Perhaps AUTOEXEC in EG only contains one of the programs, not both of them.

I'm stumped on this one. If the poster is running EG, whether pointing to a local install or a server install, running both programs should cause &PATH to be created correctly.

Cynthia
AndrewHowell
Moderator

Okay, here's my thought logic on this issue: 

 

ERROR: Physical file does not exist, C:\WINDOWS\system32\&path\data\mp_traffic.csv.
WARNING: Apparent symbolic reference PATH not resolved.

For some reason, the PATH macro variable is not being set - without having access to the actual EG project, I'll assume there's some SAS code in an AUTOEXEC process flow which is not running, possibly because the option to automatically run the AUTOEXEC process flow is not set in the user's EG options.

 

So, where does C:\WINDOWS\system32 come from? When referencing files and/or folders, if you do not specify an absolute path (which the PATH macro variable should do), then it's a path relative to the "current folder". Where this folder is depends on things like whether or not you have set the SASINITIALFOLDER system option, or how you invoked SAS. For more information on how the current folder is determined, click here.

 

A little bit of cheat code reveals the location of the current folder. (There may be better ways, but this works for me.)

 

libname MyTmp "."; /* Set libref to current folder */
%put %sysfunc(pathname(MyTmp)); /* Show the path of the libref */
libname MyTmp clear; /* Clear the libref */

I'm guessing for some it will be set to C:\WINDOWS\system32.

 

But you'll still have to work out why &PATH is not being set correctly..

HFJL
Fluorite | Level 6

Hi Cynthia,

 

This is what I see after submitted your code:

 

image.png

Cynthia_sas
SAS Super FREQ
Hi:
So when you use EG, and you run BOTH programs, your files should be written in that location in a subdirectory called data.

After you run BOTH programs for EG, your PROC CONTENTS should show the above location (just like my location shows in the video).

Can you rerun both of the EG programs and then take a screen shot of what is showing in the top of your PROC CONTENTS output (the part that shows the physical path location).

Cynthia
Oisin
Calcite | Level 5

Hi i am getting the error below when following the Setup Instructions for SAS Enterprise Guide.

 

The EG version I have in work is 5.1 and the Base sas version I have is 9.2 

 

ERROR: The XLSX engine cannot be found.
ERROR: Error in the LIBNAME statement.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
WARNING: Libname XL is not assigned.
ERROR: The XLSX engine cannot be found.
ERROR: Error in the LIBNAME statement.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
WARNING: Libname XL is not assigned.
ERROR: The XLSX engine cannot be found.
ERROR: Error in the LIBNAME statement.
ERROR: Libname XL is not assigned.
WARNING: Libname XL is not assigned.
ERROR: The XLSX engine cannot be found.
ERROR: Error in the LIBNAME statement.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.
ERROR: Libname XL is not assigned.

Panagiotis
SAS Employee

Check out this post: https://communities.sas.com/t5/Programming-1-and-2/Programming1-setting-up-practice-files-libname-er...

 

 

You will need to use one of the other options to take this course. Both are free. 

 

- SAS University Edition

- SAS OnDemand for Academics

 

The course has information on how to set them up. While the interface will be different, you will still learn to code and can apply that in your version of Enterprise Guide.

 

Let us know if you have any more questions.

 

- Peter

Reeza
Super User
The version of SAS you have is very old, I would recommend learning on a newer version of SAS. Academics on Demand and SAS University Edition provide two free versions for learning that are 9.4 TS1M6, so the latest version and features are available to you.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

LIBNAME 101

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.

Discussion stats
  • 44 replies
  • 9384 views
  • 22 likes
  • 12 in conversation