BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
anthfoster
Fluorite | Level 6

Hi,

 

Has anyone attended the Macros Essentials course?  I'm attempting to access the programs used on the course via SAS Stuidio, which needs a program to run that creates data (cre8data).  This program includes the following statements;

 


%let path=s:\workshop;

 

and

 

%include "&path\setup.sas" ;

 

My problem is that I am unable to put a path in the %let statement which works with the %include, On the course the 's:\workshop' path was used but this was obviously a path that was valid on the machines in the SAS office.  I need to change this path to one that can access the files on my machine.  I access SAS Studio via VMWare Player and I've checked that the VM has the shared folder path of the physical location.  I can see the file that I need in Folder Shortcuts.

 

No matter which paths I try I keep getting the following errors;

 
WARNING: Physical file does not exist,
/opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\Anth\Documents\SASUniversityEdition\SAS_Macro\SAS_Macro.
ERROR: Cannot open %INCLUDE file 'C:\Users\Anth\Documents\SASUniversityEdition\SAS_Macro\SAS_Macro'\setup.sas.

 

So far I've tried referencing the path of the folder shortcut, in which the setup.sas file is present, and I've tried referencing the actual windows path on my laptop.  

 

Anyone have any ideas of where I'm going wrong?

 

Thanks

 

Anthony

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

The error message shows what you are doing wrong. You have given SAS a Windows path, C:\Users\Anth\Documents\SASUniversityEdition\SAS_Macro\SAS_Macro, but SAS is actually running on the Unix virtual machine. So it does not understand Windows syntax for path names. Hence it thinks you are looking for a file whose name starts with the characters uppercase C and colon and is in the current working directory. Hence the error message:  /opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\Anth\Documents\SASUniversityEdition\SAS_Macro\SAS_Macro.

 

Read the instructions on setting up the folder mapping.  Or look for the other 50 times this question has been asked on this site.  Or read this KB entry:  http://support.sas.com/kb/53/333.html 

 

 

View solution in original post

4 REPLIES 4
Tom
Super User Tom
Super User

The error message shows what you are doing wrong. You have given SAS a Windows path, C:\Users\Anth\Documents\SASUniversityEdition\SAS_Macro\SAS_Macro, but SAS is actually running on the Unix virtual machine. So it does not understand Windows syntax for path names. Hence it thinks you are looking for a file whose name starts with the characters uppercase C and colon and is in the current working directory. Hence the error message:  /opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\Anth\Documents\SASUniversityEdition\SAS_Macro\SAS_Macro.

 

Read the instructions on setting up the folder mapping.  Or look for the other 50 times this question has been asked on this site.  Or read this KB entry:  http://support.sas.com/kb/53/333.html 

 

 

Reeza
Super User

@anthfoster wrote:

I access SAS Studio via VMWare Player and I've checked that the VM has the shared folder path of the physical location.  I can see the file that I need in Folder Shortcuts.

 

 


 

So you created a custom shared folder location, besides the myfolders required?

 

If so you access it as:

http://support.sas.com/software/products/university-edition/faq/shared_folder_access_existing.htm

 

The last line is key:

To reference this folder shortcut in a SAS program, use /folders/myshortcuts/folder-name

 

Cynthia_sas
SAS Super FREQ

Hi:
  You should NOT tamper with the %include. That program CRE8DATA.SAS is designed to run if these are true:
1)You unzip ALL the files into a directory location where you have WRITE access (you cannot just unzip the CRE8DATA.SAS program into the folder)

2) you make a folder called MC1 in that write location

3) you change the %LET statement (and ONLY the %LET statement in CRE8DATA.SAS) as appropriate for where you have unzipped the files in your  system and according to your method of using SAS:

In class: %let path=s:\workshop;
Windows: %let path= c:\classes\mc1;
Unix: %let path= /usr/classes/mc1;
SAS UE using shared folder location: %let path= /folders/myfolders/mc1;
SAS OnDemand: %let path=/home/your_username/mc1;
SAS UE with shortcuts: %let path=/folders/myshortcuts/mc1;

 

  Here's the ONLY statement you should change in the CRE8DATA.SAS program in the attached screen shot.

cynthia

 how_to_change_cre8data_make_files.png

anthfoster
Fluorite | Level 6

Thanks to everyone for your replies, your suggestions helped me realies that the '\' should have been a '/', which was causing the error.

 

Cheers


Anthony

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 13128 views
  • 3 likes
  • 4 in conversation