Desktop productivity for business analysts and programmers

E. Guide: Save files in other server

Reply
N/A
Posts: 0

E. Guide: Save files in other server

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 '\\172.1.1.11\files\'

thanks,
Luis
Super User
Posts: 3,233

Re: E. Guide: Save files in other server

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...)
N/A
Posts: 0

Re: E. Guide: Save files in other server

I need to export files from Server (UNIX) to my pc(Windows). Thanks.

PROC EXPORT DATA= WORK.Data
OUTFILE= "d:\Datos de Usuarios\S08027\My Documents\Data.csv"
DBMS=CSV REPLACE;
RUN;

-------LOG-------------
ERROR: Insufficient authorization to access /sas/SASConfig/Lev1/SASMain/d:\Datos de Usuarios\S08027\My Documents\Data.csv.
Super User
Posts: 3,233

Re: E. Guide: Save files in other server

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: '\\172.1.1.11\files\'? If so try this in your OUTFILE=. Message was edited by: SASKiwi
Respected Advisor
Posts: 4,131

Re: E. Guide: Save files in other server

Hi

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.

HTH
Patrick
N/A
Posts: 0

Re: E. Guide: Save files in other server

I understand that the path is the problem, what do I modify in this code?

PROC EXPORT DATA= WORK.Data /* This dataset is in UNIX Server*/
OUTFILE= "\\193.29.1.1\Target\Data.csv" /*this path is a windows pc*/
DBMS=CSV REPLACE;
RUN;

thanks a lot for your help. SOS!

Luis Message was edited by: LuchoR
Community Manager
Posts: 2,887

Re: E. Guide: Save files in other server

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

Chris
N/A
Posts: 0

Re: E. Guide: Save files in other server

I think that I can not do it through code.

ok, thanks a lot everybody.
Super User
Posts: 3,233

Re: E. Guide: Save files in other server

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.
N/A
Posts: 0

Re: E. Guide: Save files in other server

Thanks SASKiwi. Unix is causing me problems!!.

Luis
Ask a Question
Discussion stats
  • 9 replies
  • 261 views
  • 0 likes
  • 4 in conversation