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;
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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.