BookmarkSubscribeRSS Feed
EvgenyRogozin
Fluorite | Level 6

 

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;




 

 

 

 

 

1 REPLY 1
Reeza
Super User

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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 1 reply
  • 1588 views
  • 0 likes
  • 2 in conversation