- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So these are the instructions:
a) Open the raw data file ParkAttendance.dat in a simple editor such as
Wordpad and review. In a comment in your program, state the number of
variables and observations.
b) Use the IMPORT procedure to read the raw data file into SAS. View the log
to verify that your data set has the same number of variables an
observation as you stated in part a.
c) Print the data set
Every time I try to import the the dat file I get a message. I am very very new to this. Any help is appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It sounds like this is for a class, is that right? When the instruction say to use the "import procedure" the instructor might be expecting you to write SAS code. Has the class shown how to write PROC IMPORT code, e.g.:
proc import file=... out=... ;
run;
?
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Are you on step A or step B? The window says "Open" and the message is not in the SAS log, so it looks like you have not submitted any code yet.
Step A tells you to open the file in a simple editor. If you want to use SAS Studio to read a .dat file, then you need to right click on the file and choose View as Text File.
Step B tells you to use the Import Procedure -- please note that under the Tasks and Utilities panel, there IS a utility called Import Data, but if you read the documentation here https://go.documentation.sas.com/api/docsets/webeditorug/3.8/content/webeditorug.pdf you'll see that it says you may have issues with .DAT files, as shown below:
However, you can always code the IMPORT Procedure or you can do what the documentation suggests and rename the file as .TXT instead of .DAT In my screen shot below, I show the PROC IMPORT code needed for my file:
Hope this helps.
Cynthia