%INCLUDE ERROR

Reply
Occasional Contributor
Posts: 5

%INCLUDE ERROR

Hi,

I've just completed  SAS Programming 2  few weeks ago. Now, I am trying to do the execises again and have copied the sas training files to a local drive.

 

I am trying to run the program to run that creates the  data (cre8data). It includes the following:

 

%let path=s:/workshop;

 

%include "&path/setup.sas";

 

I have updated the path to point to the local drive on my PC however keep getting the following error.

 

WARNING: Physical file does not exist, /bqlpnas02.boq.local/user/timbim/SAS Exercises/setup.sas.

ERROR: Cannot open %INCLUDE file /bqlpnas02.boq.local/user/timbim/SAS Exercises/setup.sas.

 

Could anyone help me identify the issue please?

 

Thanks kindly,

Mags

 

Trusted Advisor
Posts: 1,381

Re: %INCLUDE ERROR

Please post the setup.sas program.

The clue to the errors is there.

Occasional Contributor
Posts: 5

Re: %INCLUDE ERROR

Hi Shmuel,

 

My first posting was incorrect. Below is the script and the warning message:

 

I am trying to run the program to run that creates the  data (cre8data). It includes the following:

 

%let path=bqlpnas02.boq.local/user/timbim/SAS Exercises;

 

%include "&path/setup.sas";

 

I have updated the path to point to the local drive on my PC however keep getting the following error.

 

WARNING: Physical file does not exist, /bqlpnas02.boq.local/user/timbim/SAS Exercises/setup.sas.

ERROR: Cannot open %INCLUDE file /bqlpnas02.boq.local/user/timbim/SAS Exercises/setup.sas.

 

Appreciate your help.

 

Mags

Trusted Advisor
Posts: 1,381

Re: %INCLUDE ERROR

see @RW9's post in the bottom. 

 

Are you using SAS University Edition  (SAS UE) ?

Super User
Posts: 5,257

Re: %INCLUDE ERROR

Are you sure that you can access that s: path from the location where your SAS session executes?
Data never sleeps
Occasional Contributor
Posts: 5

Re: %INCLUDE ERROR

My first posting was incorrect. Below is the script and the warning message:

 

I am trying to run the program to run that creates the  data (cre8data). It includes the following:

 

%let path=bqlpnas02.boq.local/user/timbim/SAS Exercises;

 

%include "&path/setup.sas";

 

I have updated the path to point to the local drive on my PC however keep getting the following error.

 

WARNING: Physical file does not exist, /bqlpnas02.boq.local/user/timbim/SAS Exercises/setup.sas.

ERROR: Cannot open %INCLUDE file /bqlpnas02.boq.local/user/timbim/SAS Exercises/setup.sas.

 

Appreciate your help.

 

Mags

Super User
Posts: 6,940

Re: %INCLUDE ERROR

[ Edited ]

This:

%let path=s:/workshop;

%include "&path/setup.sas";

WARNING: Physical file does not exist, /bqlpnas02.boq.local/user/timbim/SAS Exercises/setup.sas.

ERROR: Cannot open %INCLUDE file /bqlpnas02.boq.local/user/timbim/SAS Exercises/setup.sas.

does not correlate, as there is no mention of s:\workshop in the WARNING and ERROR. Therefore you must have another place in your code where macro variable path is set to the values resulting in

/bqlpnas02.boq.local/user/timbim/SAS Exercises/
---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Super User
Posts: 7,401

Re: %INCLUDE ERROR

Are you using SAS University Edition?  That runs on a virtual image and you can't stipulate path names to local machine.  Look in the help:

https://support.sas.com/software/products/university-edition/faq/SAS_libname.htm

Occasional Contributor
Posts: 5

Re: %INCLUDE ERROR

I'm using SAS Enterprise Guide 4.1

Super User
Posts: 6,940

Re: %INCLUDE ERROR

Enterprise Guide is just the GUI frontend for the SAS System. Since your problem is with code that runs in the SAS process, you have to take care that file references will work there.

So you need to look at

- local (PC only) or client/server installation?

- if client/server, which operating system is used on the server (I presume UNIX from your previous posts), and how is a shared resource (I guess that the s:\ drive is such) mounted there?

 

Ideally, in a server-based environment, one can log on to the server with a file transfer tool like WinSCP and use that to navigate through the server's filesystem, so you can determine the correct pathname for your include.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 9 replies
  • 205 views
  • 3 likes
  • 5 in conversation