SAS beginner, I am working with SAS University edition to look at a public dataset from 2007, and when you download the zip file to obtain the data, it contains an import/transport file (.sas), a formats file (.sas7bcat), and the data file (.v8x). It also contains a PDF with some instructions. I was instructed to put everything in one folder, make a library for it, then open the import file and run the following code which runs without errors:
filename FILE1 "PATH ON COMPUTER WHERE DATA FILE IS FOUND\hints2007.d2009_02_12.public.v8x";
proc cimport file=FILE1 data=SUBSTITUTE LIBRARY AND FILE NAME HERE;
run;
The 3 notes that come out of this are:
Then I do:
Options fmtsearch=(libraryname);
Which also runs fine. My errors arise when I go to do some re-coding of variables using the formats. After "data ______;" and "set ______;" I get this error - 292 times, one for each formatted variable:
ERROR: File HINTS32.FORMATS.CATALOG was created for a different operating system.
Isn't this what the transport file is meant to take care of? Is there something wrong with they way they have instructed me to do this or the way I am executing it? I have tried meddling with it a little based on the SAS help pages, but this public dataset is heavily used so if there was some kind of mistake in their instructions I think someone would have noticed by now and amended. I assume I am doing something wrong, but what?
You only got the dataset in transport format, but the .sas7bcat is a normal catalog file, which is OS and version specific.
You either need
- the catalog in transport format
- SAS code to create the format (the proper method anyway)
- a dataset that can be used as a cntlin for proc format
You only got the dataset in transport format, but the .sas7bcat is a normal catalog file, which is OS and version specific.
You either need
- the catalog in transport format
- SAS code to create the format (the proper method anyway)
- a dataset that can be used as a cntlin for proc format
Thank you, Kurt, I emailed yesterday looking for additional files and hope to hear from them soon.
FWIW, I looked at iterations of the survey from 2005 and 2011 this afternoon, and the format approach is completely different in all three. 2005 uses a macro which works beautifully and 2011 gives two .sas code files to accomplish this. This is probably not an efficient way for me to learn SAS!
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.