SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

%include not working - data integration studio

Occasional Contributor
Posts: 15

%include not working - data integration studio


I have following problem - see this log
1 %include 'N:\SAS Projects\_RETAIL\MG\';
2 WARNING: Physical file does not exist, /some/unix/path/N:\SAS Projects\_RETAIL\MG\
3 ERROR: Cannot open %INCLUDE file N:\SAS Projects\_RETAIL\MG\

The first line is my code. I am using data integration studio (in win).
I simply want to include external file with sas code, BUT sas always put some strange unix path before the file with code (2nd line of the log). Maybe it is some default path in connection with repository or something else ... i really don't know.
So how can I solve this? How can I force sas not to put /some/unix/path/ before filre reference?

Thanks for replies
Super Contributor
Posts: 356

Re: %include not working - data integration studio

The strange path is a default path setup for the workspace server.

Note the server may not have the mapped network drives that you do on your pc.

Either use UNC file reference, or save the file in the deafult path on the server.

SAS Employee
Posts: 51

Re: %include not working - data integration studio

Barry is correct that the system is appending a default path to the one you've indicated. If you don't use a UNC path (on Windows) or a path from root (on Unix or Linux), the system will assume you're typing a path relative to the application server context root (i.e. "SASApp" in your server installation directory). Using a full path as described above should produce the behavior you expect. I noted that you mentioned "Unix path" below though. This would indicate that the Workspace Server your code is running on is on Unix, in which case you'd need to ensure your code file is located on the Unix server tier.

One other note: If you'll need to promote the jobs you're created from DEV to TEST or PROD, you might want to consider using some kind of relative path so that you don't have environment specific paths embedded in your code. In this case, you'd want to place your code in some directory under the "SASApp" level so the paths are the same between environments.

If you need more detail, please let me know.


Tim Stearn
Occasional Contributor
Posts: 15

Re: %include not working - data integration studio

Thanks for explanation.

I have tried also UNC path, but it doesn't work. - it doesn't matter now.

Is there any possibility how to tell to Integration Studio automatically load some local files before running script?
Occasional Contributor
Posts: 7

Re: %include not working - data integration studio

You cannot include files residing on your local machine in DI Studio processes unless this location is also accessible over the network. (eg. through Windows file sharing)

Processes started from DI Studio run on a workspace server. Files you want to include need to be accessible by that workspace server. This can be achieved by placing the files in a directory on the server itself or by placing them in a location accessible over the network.
Posts: 70

Re: %include not working - data integration studio

I know my question should go to SAS EG community, but since my question is very similar to Julo's, hope you all don't mind it.

I had exactly same problem with Julo except that my program ran in remote Linux server through EG. The trouble is that it not only showed error message in log, but also prevented me from running any other code. I mean, even after I restarted EG and ran some new code, the same error message still popped up as if the previous include statement was still running behind. I think I may need some way to quit the session or somehow, but I don't know how to do it.

Thanks in advance.

Ask a Question
Discussion stats
  • 5 replies
  • 5 in conversation