DATA Step, Macro, Functions and more

Input/Infile Statements

Accepted Solution Solved
Reply
Occasional Contributor K23
Occasional Contributor
Posts: 5
Accepted Solution

Input/Infile Statements

 

data Weather_Report;
infile 'C:\New folder\WeatherReport.txt\'
LRECL = 100 DLM= ' ';
input Month $ Temperature;
run;
proc print data= Weather_Report;
run;

I am a very new in SAS programming. I am trying to read WeatherReport.txt in SAS, but it shows ERROR when I run it.

ERROR : Physical file does not exist...................

Can anyone tell me how to use INFILE statement for the following data (.txt) -

 

Month Temperature

Jan 10

Feb 12

March 14

April 20 

May 23

June 27

 


Accepted Solutions
Solution
‎10-05-2015 10:05 AM
Respected Advisor
Posts: 4,649

Re: Input/Infile Statements

Remove the last backslash in the file name

 

infile 'C:\New folder\WeatherReport.txt'
PG

View solution in original post


All Replies
Solution
‎10-05-2015 10:05 AM
Respected Advisor
Posts: 4,649

Re: Input/Infile Statements

Remove the last backslash in the file name

 

infile 'C:\New folder\WeatherReport.txt'
PG
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 165 views
  • 0 likes
  • 2 in conversation