BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
9 REPLIES 9
SASKiwi
PROC Star
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...)
deleted_user
Not applicable
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.
SASKiwi
PROC Star
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
Patrick
Opal | Level 21
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
deleted_user
Not applicable
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
ChrisHemedinger
Community Manager
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
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
deleted_user
Not applicable
I think that I can not do it through code.

ok, thanks a lot everybody.
SASKiwi
PROC Star
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.
deleted_user
Not applicable
Thanks SASKiwi. Unix is causing me problems!!.

Luis

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 1072 views
  • 0 likes
  • 4 in conversation