DATA Step, Macro, Functions and more

exporting from unix environment to window environment

Reply
Contributor
Posts: 21

exporting from unix environment to window environment

I am working on SAS 9.4 and it is on Unix server now when I want to export a SAS dataset in CSV on my local machine, I get an error.

I know it is because I am trying to transfer it fromUnix... but do we have an alternative to transfer it to window(by code not by file export option)

 

code:

proc export data=ABC dbms=csv

outfile="\\homedrivestmp\homedisk1\emar646\Desktop\Forecast\New folder\NEW_ENROLLMENT.csv"

replace;

run;

 

error: 

ERROR: Insufficient authorization to access /sas/common/config/Lev1/SASApp/\\homedrivestmp\homedisk1\emar646\Desktop\Forecast\New
folder\NEW_ENROLLMENT.csv.

 

I also tried 

%ds2csv (data=abc, runmode=b, csvfile=\\homedrivestmp\homedisk1\emar646\Desktop\Forecast\New folder\retail.csv);

 

its not working and just opening the sas dateset and not transferring anything

Super User
Posts: 10,577

Re: exporting from unix environment to window environment

Posted in reply to Deepankar

You are using the wrong (Windows-style) pathname on UNIX. Ask your UNIX admins how to access the share from the SAS server.

Hint: UNIX uses the forward slash as a separator of directories.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Contributor
Posts: 21

Re: exporting from unix environment to window environment

Posted in reply to KurtBremser

well, the error is, its not able to access the window location. people from here says, its not possible.

Super User
Posts: 10,577

Re: exporting from unix environment to window environment

Posted in reply to Deepankar

Store the file on the UNIX system and then use a tool like WinSCP to fetch it.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Contributor
Posts: 21

Re: exporting from unix environment to window environment

Posted in reply to KurtBremser

client wont buy a new software, we are limited to these resources only.

Super User
Posts: 10,577

Re: exporting from unix environment to window environment

Posted in reply to Deepankar

WinSCP is free as in beer (and free as in speech).

 

If your customer wants automated transfer, they have to provide a means for that. Either a shared resource or some kind of ssh-based file transfer.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 5 replies
  • 115 views
  • 0 likes
  • 2 in conversation