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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.