I have SAS on Linux (unix?) grid under Citrix server. My CSV file is on a local or windows install. Is there anyway to read this file programmatically? I can do a copy files task and then import, but the copy files task isn't programmable. I can use proc import if it's Excel because i can specify server_name, but I cannot do this if dbms=csv. Are there any alternatives that I've missed?
Thanks
There is probably not a way for your remote/Citrix session to read the CSV from your local disk. As you say, Copy Files can help you with this in a SAS Enterprise Guide flow, but it doesn't help when running a plain batch SAS file.
Two alternatives:
- Rethink the policy of keeping the CSV files local and instead store them somewhere network-accessible for your SAS session. In our workplace we're lucky enough to have network shares that we can access from Windows (using UNC notation) and Unix (using traditional Unix-style paths).
- Use a process like FTP or other file-transfer process to move the file from your local PC to a place where the Unix SAS can get to it.
Use a network resource that is also mounted on the Linux server(s). Or store the file on a computer which has a SSH server, so you can use FILENAME SFTP from the SAS side.
Contact those who set up the environment, they should have defined a way to get data into the system. But don't think that reading the data from you local drive will work.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.