I am new to SAS and very happy to learn the existence of such a forum. Basically, I am having a great deal of problem trying to import data from word/excel, regardless of how simple the dataset is. For example I have saved a file named 'mydata' on the word and saved it on the desktop. Using the coding;
input gender $ age height weight;
it keeps giving the message;
ERROR: Physical file does not exist, C:\Users\Sozenler\Desktop\SAS 9.1.3 Portable\mydata.txt.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.MYDATA may be incomplete. When this step was stopped there were 0
observations and 4 variables.
WARNING: Data set WORK.MYDATA was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
Could you please tell me what could I be doing wrong here?
Any help would be appreciated.
Thanks lot in advance
it is the '\Desktop\SAS 9.1.3 Portable' one mate. As for the wizard method, I am fine with it. I just wanted to learn the coding.
Thanks for the response.
Not sure which version of SAS you're using, but in Enterprise Guide, you can use the wizard for the import, and then copy the code that SAS automatically generates. Otherwise, I would stick with the wizard import unless you plan on importing the same data set regularly.
There is an import wizard in base sas too. So unless you're running it in batch mode you should be able to use an import wizard which will generate the code to import your file for you.
"His programming is malfunctioning. It begins! Get your weapons, he's going to become a killbot!!!" - bryangoodrich
I generally use import wizard as the others have suggested. I find that sometimes with .xlxs (? new excel files) files it is a bit temperamental, so once you think you have imported it, check that its actually there!
Advertise on Talk Stats