Dear community!
In short: Is it possible to access files on locally linked network shared when executing a program on a remote sas server? I do not happen to know any mechanism to access local network shares directly.
I would like to run locally stored sas programms and have them %include (or autocall) other local files on a remote sas server using EG 8.2. I do not have option to run sas locally nor is it convenient to have the files to be included stored on the server due to the limited git integration in EG.
Of course an %include statement executed on the remote sas server does not "see" code on the network shares linked to the local pc. On the other hand it is possible (e.g. with the import data task) to import data from those shares. The code generated uses files in a EG specific tmp directory (/var/opt ... saswork/SAS.work_[:hex:]_sepushsas000 in my case (where [:hex:] is a 12 char hexadecimal).
Now as EG can do that on the fly: How would one create such files? Or could it be that they are simply copied over to the server using the magic of the CopyFile task? How would one find out what temp directory EG uses?
Cheers
In a word, no, not unless you make your shares available on your remote SAS server. If you setup and / or access your shares as UNC paths like this - \\MyServer\Myfolder\MyFolder2 - then there is absolutely no reason why such shares can't be available on your remote SAS server and any other PC on your network. That's what we do and it works a treat. Hint - don't set up drive letter shares on your PC, as they are unique to your PC and can't be used anywhere else.
Thank you again for your reply, Patrick.
No, unfortunately it does not work that way with my system. Maybe it is that your sas server uses MS OS ... while mine runs on UNIX
%include "<UNCPATH>";
results in an attempt to read it from the Lev1 config directory ... and - as a consequence - an error that the file does not exist.
Which is reasonable ... how could sas or the underlying OS resolve the UNC pointer? But if there was a method ... I'd be happy to learn about it.
Talk to your server admin, they could might help you configure mapping to the required drive.
As @LinusH says, setting up UNC folder shares is a job for your system or SAS administrator. Typically these aren't available by default and require adminstration permissions to configure.
Thank you all very much for your remarks.
Out of curiosity: How are the set up on the UNIX side? Via smb?
On our linux SAS server, the admins have "mounted" some windows network shares, so they look to me like a regular linux directory. It might be via CIFS: https://linuxize.com/post/how-to-mount-cifs-windows-share-on-linux/ .
I don't think it's SMB. We use SMB for the opposite (accessing linux directories from Windows).
@fja wrote:
Thank you all very much for your remarks.
Out of curiosity: How are the set up on the UNIX side? Via smb?
Usually these days the disks are normally already attached to their one server.
So to access them from your PC they configure that server to share the disk (or some sub folder on the disk) with Windows.
Then on Unix they mount the same location as part of the Unix filesystem.
So what you see from Windows as \\servername\sharename\project_folder
Might be mounted on Unix as /mnt/servername/sharnename or perhaps mounted as /mnt/servername/sharnename/project_folder.
Ask your IT support to implement such a setup for your SAS users so that the locations they need to read (and/or write) are accessible from their Unix sessions.
@fja - I'm not familiar with how this is done on Unix, but looks like that has been answered by @Quentin and @Tom . On Windows, sharing is available out of the box and just requires the right permissions. For example I can look at any D drive of any of our Windows SAS servers by typing \\MySASServer1\D$ into Windows Explorer on any Windows computer on the company IT network. Drives can also be folder shares in which case I could type \\MySASServer1\MySASDrive1$.
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!
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.
Ready to level-up your skills? Choose your own adventure.