I want to import a csv file. I'm sure the file is in the correct folder.
Could anyone help me understand the following messages in the log?
11 proc import out=data1
12 datafile="C:\Users\Michelle\Desktop\報告ㄦ\大四\運統\作業3\DB1B2017Q12"
13 dbms= csv replace;
14 getnames=yes;
15 run;
ERROR: Physical file does not exist, C:\Users\Michelle\Desktop\報告ㄦ\大四\運統\作業3\DB1B2017Q12.
ERROR: Import unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.06 秒
cpu time 0.06 秒
If SAS says the file is not there, it is not there. Period 🙂
It seems to me though, that you are missing at least a .csv extention in your datafile option.
You probably have the file open somewhere. Close the file and try again.
Is the sas session running on your computer or on a server? If it is not running on your computer, you have to move the file to a location that is accessible by the sas server.
If the SAS SERVER component where your script executes isn't installed on your computer then it has most likely no access to a file on your desktop.
If above is the case then you need either to upload the file onto the server where SAS executes and then use the server path in your proc import script.
If you're using the SAS EG or Studio CLIENT then you can also use the client's import wizard. In EG that would be under menu File/Import Data.
Because that's using the client installed on your computer you will have access to a file on your desktop. The client does then the conversion and upload to SAS for you.
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.