BookmarkSubscribeRSS Feed
rupesh009
Calcite | Level 5

96 data rupesh;
97 infile '?E:\s\SAS\practice\data.txt';
98 input name$ age;
99 run;

ERROR: Physical file does not exist, ?E: s\SAS\practice\data.txt.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.RUPESH may be incomplete. When this step was stopped there were 0
observations and 2 variables.
WARNING: Data set WORK.RUPESH was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds


100 data rupesh;
101 infile '?"E:\s\SAS\practice\data.txt"';
102 input name$ age;
103 run;

ERROR: Physical file does not exist, ?"E: s\SAS\practice\data.txt".
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.RUPESH may be incomplete. When this step was stopped there were 0
observations and 2 variables.
WARNING: Data set WORK.RUPESH was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.04 seconds

 

 

10 REPLIES 10
bobpep212
Quartz | Level 8
Stray ? in front of the E:\ - remove that ?
rupesh009
Calcite | Level 5

data rupesh;
infile '‪E:\s\SAS\practice\data.txt';
input name$ age;
run;

 

above one is my program,

 

below is the log 

 

 


96 data rupesh;
97 infile '?E:\s\SAS\practice\data.txt';
98 input name$ age;
99 run;

ERROR: Physical file does not exist, ?E: s\SAS\practice\data.txt.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.RUPESH may be incomplete. When this step was stopped there were 0
observations and 2 variables.
WARNING: Data set WORK.RUPESH was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds


100 data rupesh;
101 infile '?"E:\s\SAS\practice\data.txt"';
102 input name$ age;
103 run;

ERROR: Physical file does not exist, ?"E: s\SAS\practice\data.txt".
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.RUPESH may be incomplete. When this step was stopped there were 0
observations and 2 variables.
WARNING: Data set WORK.RUPESH was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.04 seconds

 

Astounding
PROC Star

SAS is very clear about the source of the error.  You refer to a file that does not exist:

 

?"E: s\SAS\practice\data.txt"

 

What is the correct spelling for the file name?  Nobody can help here.  You just have to name a file that actually exists.  Some possibilities (because they are unusual in the spelling of a file name):

 

  • The question mark at the beginning
  • Adding the double quotes (file names do not usually contain quotes)
  • The space after E:  (often there would be a backslash instead of a space)

But nobody is looking at your computer except you.  So find the right spelling for the file that you want to read.

rupesh009
Calcite | Level 5

file is there but it is showing error , that's why i am asking your help

do i need to change any setting?

bobpep212
Quartz | Level 8
Not sure what to tell you. Somehow that 'E:\ is resolving to ?E: . Maybe try putting it in double quotes and running it.
Kurt_Bremser
Super User

@rupesh009 wrote:

file is there but it is showing error , that's why i am asking your help

do i need to change any setting?


You just have to TYPE THE FILENAME CORRECTLY. I guess you copy/pasted that code across something that converted part of the text to unicode. Re-type everything from scratch in SAS.

VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

ERROR: Physical file does not exist, ?E: s\SAS\practice\data.txt.

 

you need to address the file path.

bobpep212
Quartz | Level 8
filename test "E:\s\SAS\practice\data.txt";

data rupesh;
infile test;
input name$ age;
run;

Are you able to associate the path to a fileref like above? Still get an error on that filename statement?

Reeza
Super User
Make sure your browser and keyboard are set to English settings otherwise you can run into trouble. Are you using a full licensed edition of SAS or SAS UE? If you're using SAS UE you need to use the myfolders folder to access data. If you're using a full version then you should be able to navigate to the file in windows, hold down SHIFT+Right Click the file, copy as path and use that in your program.

bobpep212
Quartz | Level 8
I'm thinking it is keyboard setting/language related as Reeza suggests. The way it is putting that ? and extra space in there. I'm using UE and here's how the error looks when you try to reference a local filepath, so I don't think it is that. But if you are using UE, then yes, you need to get the file into myfolders.
ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/E:\s\SAS\practice\data.txt.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 1496 views
  • 1 like
  • 6 in conversation