Hi We're using SAS EG V 7.13 HF1 (7.100.3.5419) (64-bit).
I'm running a script from a local Windows directory. I have a file called sas_pwd.sas I'm referencing in the command:
%include 'sas_pwd.sas';
However it's not being picked up by my SAS script.
I'm getting the following error message.
24 %include 'sas_pwd.sas'; WARNING: Physical file does not exist, /sasdata/work/sasuser/rolap/sas_pwd.sas. ERROR: Cannot open %INCLUDE file sas_pwd.sas.
Which is in my home directory for SAS.
So how can I either have the script point to the file on my local machine where it's in the directory say: c:\mydir\me
or how can I have the script find the file ion the Linux server where it's in say /home/rolap/?
If you can answer to both that'd be a bonus.
Hi We're using SAS EG V 7.13 HF1 (7.100.3.5419) (64-bit).
I'm running a script from a local Windows directory. I have a file called sas_pwd.sas I'm referencing in the command:
%include 'sas_pwd.sas';
However it's not being picked up by my SAS script.
I'm getting the following error message.
24 %include 'sas_pwd.sas';
WARNING: Physical file does not exist, /sasdata/work/sasuser/rolap/sas_pwd.sas.
ERROR: Cannot open %INCLUDE file sas_pwd.sas.
Which is in my home directory for SAS.
So how can I either have the script point to the file on my local machine where it's in the directory say: c:\mydir\me
or how can I have the script find the file ion the Linux server where it's in say /home/rolap/?
If you can answer to both that'd be a bonus.
Is your SAS installed locally (not EG) ?
Here are the way to check.
- Do you see Local under servers in EG? If yes then locally installed.
- Run PROC SETINIT; RUN; and see the operating system in log.
WARNING: Physical file does not exist, /sasdata/work/sasuser/rolap/sas_pwd.sas.
Looking at your log I can say that your SAS is installed on Unix or Linux server (looking at the path). If you don't give fully qualified physical path then SAS ready from the default (in your case "/sasdata/work/sasuser/rolap/").
Your EG is connecting to the Server and runs your programs in server not in your local machine. In order to read anything from your local machine to Server or vice versa they need to be connected each other. In most organizations a drive will be mount to server which can be added in local machine as network drive. You may need to contact your admins or colleagues to find that out.
You can also transfer files between the server and local machine using open SSH like Putty or WinSCP. Try WinSCP if you have given access to the server.
If you want your Unix machine to see your local drive then export it and have the system admin mount it somewhere on your Linux machines file system. Most unix admins will not permit this and you probably don't want to permit it either.
Otherwise just access files that are on your linux machine already. Or upload the files using a file upload task in your Enterprise Guide process flow.
If the files are in your home directory you can normally reference that using ~.
%include '~/sas_pwd.sas';
As @Tom mentioned you can use "Copy files" in EG instead of additional WinSCP or some other SSH. Here are the some useful links for Copy file.
https://blogs.sas.com/content/sasdummy/2012/12/06/copy-files-in-sas-eg/
https://blogs.sas.com/content/sasdummy/2016/11/14/copy-files-task-moved-menus/
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.