03-26-2015 09:22 AM
The filename itself can cause this error. In this example, the sq at the beginning of the filename caused the error.
Filename sql_sas_test.xlsx caused
ERROR: Physical file does not exist, C:\Users\abc1234\AppData\Local\Temp\SEG7140'l_sas_test-5f2bb2073645403abf202063d7bf4130.txt. Note: The SAS System stopped processing this step because of errors. Warning: The data set WORK.SQL_SAS_TEST may be incomplete. When this step was stopped there were 0 observations and 16 variables.
Rename the file as sas_test_sql.xlsx and the file opens ok
NOTE: The infile 'C:\Users\abc1234\AppData\Local\Temp\SEG7140\sas_test_sql-3215f6df613742f2860a81d5e79b4c89.txt' is: Filename=C:\Users\abc1234\AppData\Local\Temp\SEG7140\sas_test_sql-3215f6df613742f2860a81d5e79b4c89 Note: 84 records were read from the infile
SAS did not like the sq in the beginning of a filename.
On standlone pc, SAS Enterprise Guide Version 4.3 (18.104.22.16896).
03-26-2015 10:47 AM
If this was the file name:
then the ' instead of a \ meant that was looking for the file in the TEMP folder.
03-26-2015 10:58 AM
That's correct, SAS changed the file path to look for a file in the TEMP folder. The sq at the beginning of the filename caused SAS to read SEG7140'l_sas_test instead of SEG7140\sas_test_sql
03-26-2015 10:55 AM
Yes, you have shown the error yourself:
Note in the first instance between SEG7140 and the filename l_sas_test... you have a single quote. This should be a \ per delimiter.
03-26-2015 11:01 AM
Correct, I was simply adding this as comments to the Discussions forum for future reference. Using SAS Enterprise Guide File, Open, Data C:\Users\abc1234\WorkDir\sql_sas_test.xlsx SAS converted this file path into C:\Users\abc1234\AppData\Local\Temp\SEG7140'l_sas_test as shown in the SAS Log tab.
03-26-2015 11:20 AM
Really, using sq in a filename does not work. Can I ask what software you are using/how you are importing to be specific, as running this code:
filename tmp "s:\temp\rob\sql_sas_test_sql-3215f6df613742f2860a81d5e79b4c89.txt";
input a $;
Worked fine for me in 9.3.