BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
yael
Quartz | Level 8

Hello expert,

 

I tried to handle it by reading and trying a lot but NO success. I want to export my output sas data to excel, the answer I got in log is

Physical file does not exist and I do not understand the problem. I am using SAS 9.2.

 

The program is:

ODS CSV FILE='C:\Temp\family.CSV';

proc means data=sasuser.sasfile120416;

var dp dq ee dr;

run;

ODS CSV CLOSE;

 

I appreciate any help,

 

Thanks a lot

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Then let's dig deeper into the setup and what possibly happens:

 

Your client software (most likely Enterprise Guide) can see your local drive(s) and does handle all the transfer stuff for you. Importing and exporting with EG tasks works well.

Your SAS code runs exclusively on the server, which does not have access to your local drive(s), and so you can't do import/export strictly from code as you would have believed it to be.

 

Remedy one: keep using the EG tasks for import/export

Remedy two: see if there is a shared network resource available that both your desktop and the SAS server have access to, and store your Excel files there

Remedy three: Use a file transfer tool like WinSCP to transfer files from your desktop to the server.

View solution in original post

9 REPLIES 9
Kurt_Bremser
Super User

Please post the relevant portion of the log.

What is your SAS setup?

University Edition, SAS On Demand, or Licensed?

Single machine, or client/server?

If C/S, which server operating system?

 

Gosh, just read it, you're on 9.2, so it can't be UE or On Demand. The other questions are still relevant, though.

yael
Quartz | Level 8

I am a student and this is SAS via the universty, My operating server is Windows 8.1

 

I am new in SAS so maybe it sounds like stupid question, but maybe the result is to save the data of the "result window" in WORK library and then to export it to EXCEL file, NO?

 

Thanks for any comments 🙂

yael
Quartz | Level 8

please...

1 ODS CSV FILE='C:\Temp\family.CSV';

NOTE: Writing CSV Body file: C:\Temp\family.CSV

ERROR: Physical file does not exist, C:\Temp\family.CSV.

WARNING: No body file. CSV output will not be created.

2 proc means data=sasuser.sasfile120416;

3 var dp dq ee dr;

4 run;

NOTE: There were 8392 observations read from the data set SASUSER.SASFILE120416.

NOTE: PROCEDURE MEANS used (Total process time):

real time 0.06 seconds

cpu time 0.03 seconds

 

5 ODS CSV CLOSE

 

 

 

Kurt_Bremser
Super User

OK, so it's verified that not only your client, but your server runs on Windows. Otherwise the ERROR message would have contained parts of a UNIX file path.

So the most likely scenario is that your SAS runs on a remote server that naturally can't see your C:\temp, as this is local to your desktop computer. Am I guessing right?

yael
Quartz | Level 8

"Am I guessing right?"

The answer: Yes 😞

yael
Quartz | Level 8
But I also have to say that I succeed to import excel file to SAS
Kurt_Bremser
Super User

Then let's dig deeper into the setup and what possibly happens:

 

Your client software (most likely Enterprise Guide) can see your local drive(s) and does handle all the transfer stuff for you. Importing and exporting with EG tasks works well.

Your SAS code runs exclusively on the server, which does not have access to your local drive(s), and so you can't do import/export strictly from code as you would have believed it to be.

 

Remedy one: keep using the EG tasks for import/export

Remedy two: see if there is a shared network resource available that both your desktop and the SAS server have access to, and store your Excel files there

Remedy three: Use a file transfer tool like WinSCP to transfer files from your desktop to the server.

yael
Quartz | Level 8

ok, I will check it and BIG BIG THANKS !Smiley Happysmileyhappy:

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

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
  • 1737 views
  • 0 likes
  • 2 in conversation