BookmarkSubscribeRSS Feed
Julo
Calcite | Level 5
Hello,

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

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
5 REPLIES 5
twocanbazza
Quartz | Level 8
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.

Barry
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.

Thanks,

Tim Stearn
Julo
Calcite | Level 5
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?
LaurentdeWalick
Fluorite | Level 6
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.
Fisher
Quartz | Level 8

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 2924 views
  • 0 likes
  • 5 in conversation