DATA Step, Macro, Functions and more

How to solve problem "ERROR: Physical file does not exist"?

Reply
Occasional Contributor
Posts: 9

How to solve problem "ERROR: Physical file does not exist"?

 

How to solve problem "ERROR: Physical file does not exist"?

 

I am learning SAS Programming 1

The program:

data work.donations;
   infile "&path/donation.dat"; 
   input Employee_ID Qtr1 Qtr2 Qtr3 Qtr4;
   Total=sum(Qtr1,Qtr2,Qtr3,Qtr4);
run;

proc print data=work.donations;
run;

Gives the Log:

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 55         
 56         data work.donations;
 57            infile "&path/donation.dat";
 WARNING: Apparent symbolic reference PATH not resolved.
 WARNING: Apparent symbolic reference PATH not resolved.
 58            input Employee_ID Qtr1 Qtr2 Qtr3 Qtr4;
 59            Total=sum(Qtr1,Qtr2,Qtr3,Qtr4);
 60         run;
 
 ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/&path/donation.dat.
 NOTE: The SAS System stopped processing this step because of errors.
 WARNING: The data set WORK.DONATIONS may be incomplete.  When this step was stopped there were 0 observations and 6 variables.
 WARNING: Data set WORK.DONATIONS was not replaced because this step was stopped.
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.02 seconds
       
 
 61         
 62         proc print data=work.donations;
 63         run;
 
 NOTE: No observations in data set WORK.DONATIONS.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.03 seconds
       cpu time            0.01 seconds
       
 
 64         
 65         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;




 

 

 

 

 

Super User
Posts: 19,775

Re: How to solve problem "ERROR: Physical file does not exist"?

Posted in reply to EvgenyRogozin

You did not define &path as it does in the sample code. Go back to that screen shot of instructions you posted last time. It has the path defined that you should as well.

Ask a Question
Discussion stats
  • 1 reply
  • 579 views
  • 0 likes
  • 2 in conversation