DATA Step, Macro, Functions and more

Physical file does not exist

Reply
Contributor
Posts: 72

Physical file does not exist

Hi,

 

I am trying to import two different csv files at once into my SAS processflow. The physical addresses are correct on my computer, but I get the error. Could you please help?

 

filename two ('P:\0773\SCOPES\CSV\2015\Oct-08-2015\ScopesCalculations_SecondaryConstruction_ 01_10092015_1158.csv'
'P:\0773\SCOPES\CSV\2015\Oct-08-2015\ScopesCalculations_ScopesCalculations_SecondaryConstruction_ 02_10092015_1219.csv');

 

data test;
infile two;
run;

 

proc print data = test;
run;

Super User
Posts: 17,829

Re: Physical file does not exist

Post your error.

 

Common reasons: its an error in your path, or you're working on a server and your server can't see your computer.

Are you working on either EG or SAS UE or On Demand?

 

Your code isn't correct either - you need an input statement in your data step to import data. All you've created at this point is a connection to the file, but you haven't tried to use it anywere?

Contributor
Posts: 72

Re: Physical file does not exist

This is the ERROR:

 

ERROR: Physical file does not exist,
/sasdata/data/sasconfig_grid/Lev1/SASMain/P:\0773\SCOPES\CSV\2015\Oct-08-2015\ScopesCalculations_SecondaryConstruction_
01_10092015_1158.csv.

 

I am using EG

 

Should I use "INPUT" statement to mention all the variables in the dataset(s)?

 

Thanks for help

Super User
Posts: 10,500

Re: Physical file does not exist

The path shown, with the change from / to \, indicates you likely are connecting to a unix based server  and that the server does not have any set up to read your locally defined P drive.

Super User
Posts: 5,256

Re: Physical file does not exist

You are confusing the path you can see from your Windows client.

SAS Server ( a grid in this situation) accesses data with paths relative to the UNIX/Linux server.

Data never sleeps
Super User
Posts: 17,829

Re: Physical file does not exist

As mentioned it looks like you're on a server.

 

Your options are:

 

  1. Determine if your server can see your local machine, may need to ask IT. This is unlikely.
  2. Move your file to the server - either FTP/SFTP or a custom EG Task http://blogs.sas.com/content/sasdummy/2012/12/06/copy-files-in-sas-eg/
  3. Use Import Data wizard from EG instead of import via code.

 

 

Contributor
Posts: 72

Re: Physical file does not exist

I see. However, how is it possible that the server can find my local machine through the "Import Data Wizard"? but not using the code?

The problem of using the wizard is that I actually need to import not only two files (this is just a test), but about 50 files at once.

Thank you
Super User
Posts: 5,256

Re: Physical file does not exist

If you wish to this by code (and perhaps regularly), try to find away to place your files at a location where your server SAS session can access them. Talk to your server adm for assistance.

Data never sleeps
Contributor
Posts: 72

Re: Physical file does not exist

Thank you. I just did
Super User
Posts: 17,829

Re: Physical file does not exist

[ Edited ]

Code is passed to the server, the GUI is a different implementation and runs locally and uploads to the server.

 

If you can run locally (sometimes there's an option) then you can use your code locally. In EG 4.3 there's a Selected Server window. Click that to see what your options may be.

 

Also, do you see Local listed under your Servers option?

Contributor
Posts: 72

Re: Physical file does not exist

I am not sure if I get this part of your answer "When clicking run there's a little drop down menu. Click that to see what your options may be." Are you talking about the "Import Data Wizard"?

 

Is it possible to use this wizard to import more than one file at once?

 

Thakns

Super User
Posts: 17,829

Re: Physical file does not exist

Do all of your files have the same structure?

 

I mistyped, the server connection is shown below. Do you see a Local option?

You can also see the little down arrow by run, if you click that it shows several RUN options, but not what I was intending to reference. 

 

Delete Server Select.JPG

Contributor
Posts: 72

Re: Physical file does not exist

Yes, they have the same structure.

 

But it seems that my server cannot read the local machine this way (I contacted the server admin)

 

1.jpg

 

 

Contributor
Posts: 72

Re: Physical file does not exist

No, that I got connected to the local machine, it seems that the "filename" statement is fine. But, there should be something wrong with the "data" statement. Could you please advise?

 

 

filename two ("/v_share/Xiaomin/SCOPES/sas_dataset/Oct-08-2015/ScopesCalculations_SecondaryConstruction_ 01_10092015_1158.csv"
"/v_share/Xiaomin/SCOPES/sas_dataset/Oct-08-2015/ScopesCalculations_ScopesCalculations_SecondaryConstruction_ 02_10092015_1219.csv");

 

data test;
infile two;
INPUT C_ST;
run;

 

 

 

ERROR: 

 

/v_share/Xiaomin/SCOPES/sas_dataset/Oct-08-2015/ScopesCalculations_ScopesCalculations_SecondaryConstruction_
02_10092015_1219.csv.
FATAL: Unrecoverable I/O error detected in the execution of the DATA step program. Aborted during the EXECUTION phase.

 

Thank you

Ask a Question
Discussion stats
  • 13 replies
  • 422 views
  • 0 likes
  • 4 in conversation