03-22-2016 04:09 PM
I am using SAS Studio 9.2 I have uploaded the practice problems that appear in The Little SAS Book (TLSB).
* Section 3.11*/ /* Program */ * Change all 9s to missing values; DATA songs; INFILE 'c:\MyRawData\KBRK.dat'; INPUT City $ 1-15 Age wj kt tr filp ttr; ARRAY song (5) wj kt tr filp ttr; DO i = 1 TO 5; IF song(i) = 9 THEN song(i) = .; END; RUN; PROC PRINT DATA = songs; TITLE 'KBRK Song Survey'; RUN;
In this instance, I am referencing problem 3-11 (above) though I’ve encountered it with every problem I’ve sampled jus to make sure.
The ‘infile statement’ directs me to the c: drive. When I click on the file’s ‘Properties’ and cut and paste the exact location of the file for the infile statement, a second infile statement appears along with five errors in the log (condensed below) and two expected warnings.
ERROR 23-2: Invalid option name C, MyRawDATA, KBRK, Song, and Survey)
When I run the problem as it appears, I get a single error message
ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/c:\MyRawData\KBRK.dat.’
I am not including the six notes here but have attached the logs of both programs. Thank you in advance for your help.
03-22-2016 05:58 PM
The "Physical File does not exist" message tells you where SAS looked for your data. The mixture of / and \ in that message tells me that your SAS is likely a server and can not see your harddrive. You have to make sure you read (and write) to locations the server sees which may involve working with either your ID or SAS admin to set permissions and identify your hard drive to the SAS session as a source. Note that the paths will likey look different.
03-22-2016 09:37 PM