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;
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?
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
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.
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.
As mentioned it looks like you're on a server.
Your options are:
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.
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?
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
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.
Yes, they have the same structure.
But it seems that my server cannot read the local machine this way (I contacted the server admin)
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.