Hi All,
I have questions about access local folder (C or network drive such as S drive etc.) when using SAS server under Linux:
1) what's the most common and convenient procedure of access local folders when using SAS server under Linux?
2) Are we uploading the files from local to server folder using PuTTY or can we define a libname on local drives (C or network drives)? Thank you!
Jade
This is largely an admin job. Basically two steps: 1. Create your windows share. 2. Mount your windows share in Linux. Google is your friend, search terms such as 'share', 'windows', 'linux/unix' etc. It could be fairly straightforward or cumbersome depending on the IT security policy of your institution.
This is largely an admin job. Basically two steps: 1. Create your windows share. 2. Mount your windows share in Linux. Google is your friend, search terms such as 'share', 'windows', 'linux/unix' etc. It could be fairly straightforward or cumbersome depending on the IT security policy of your institution.
A library (for SAS on UNIX, including Linux) can be defined for any directory in the SAS server's filesystem. This includes network mounts.
To use a directory in your local Windows drive, you would need to share that directory as a network resource and mount it on the Linux server. Another method would be to share a resource on the server, and mount it on your desktop. Or you can use a resource on a file server mounted on both machines.
Uploading with PuTTY is another option, of course. Here you also have the automatic conversion of text files to the Linux character set.
If using SAS Enterprise Guide (you didn't say), you can use the Copy Files task to move files between your Windows drives and the Linux SAS session. That's easy and doesn't require admin help, but it depends on this particular SAS Enterprise Guide feature.
If using straight code, then you need a network share that both systems can see (as others have said...) or another external application such as FTP to move the files.
Thank you all!
I get confused with SAS PC files server, if the SAS PC files server installed, will you be able to access local folder through SAS PC files server?
SAS pc file server is a piece of application running on Windows box that allows you to leverage 'libname pcfiles' engine from Windows or Linux box to read in Microsoft files, mainly Excel and Access. It will not grant you the capacity to read windows shares from linux (where your SAS is installed). As mentioned by many in this thread, you will first need to make your windows folder visible to Linux, then you may use (you don't have to in many occasions) pcfiles engine to read those Microsoft files through pc files server.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.