We're working in a server with OS UNIX (AIX). We want to export a lot of files (PROC EXPORT) to a local pc (OS Windows), but we got an error message. We tried to create a library in this server routed to windows pc. is it possible? how do I do?
this code, I run in server:
Libname mylib '\\220.127.116.11\files\'
Please share your complete PROC EXPORT code and SAS log with error messages. We cannot provide the best advice without knowing the full story. For example we do not know what format your exported files are (CSV, Excel, Access, etc...)
Your OUTFILE = string needs to reference your PC from your Unix server. Is this what you were trying to do in your first message with: '\\18.104.22.168\files\'? If so try this in your OUTFILE=.
Message was edited by: SASKiwi
If you look at the path in the ERROR log you will see that the part before d:\ is actually a UNIX path.
What happens here is:
As the code runs on the UNIX server path names must be declared as the UNIX server sees them. The path you pass to PROC EXPORT is a Windows path (as you might have mapped it on your PC) about which the UNIX server knows nothing - and because the path starts with "d" UNIX thinks this a a partial path starting from where you are right now in the moment (which is the directory from where you start SAS on the server).
Easiest would be you point OUTFILE to a directory on a share which you also can map from your PC.
If this is only a once off: What about just manually selecting work.data, left click, chose export and as file type .csv.
In this case, you need your UNIX server to drop a file to your Windows PC. You would need to use a drive-mapping technology such as SAMBA (so you can address your UNIX path from your PC as a mapped drive), or get fancier to push the CSV file to the PC using FTP (using the FTP method in the FILENAME statement).
Yes you can do it through code using the FILENAME statement and the FTP option. Check this out in SAS online help. However it would be a good idea to talk to your Unix system administrator to see if the security/network setup at your site would allow this in the first place. If you are not familiar with FTP it stands for File Transfer Protocol and is an easy way to move files between computers especially those with different operating systems.