BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
psyscience
Calcite | Level 5

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:

 

NOTE: PROC CIMPORT begins to create/update data set WORK.HINTS32
NOTE: Data set contains 473 variables and 7674 observations.
Logical record length is 4608
NOTE: PROCEDURE CIMPORT used (Total process time):
real time 1.24 seconds
cpu time 1.03 seconds
 

 

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

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

 

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

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

 

psyscience
Calcite | Level 5

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!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1444 views
  • 0 likes
  • 2 in conversation