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

Hi all

I am new to importing files from different programs into SAS and seem to be having a problem with retaining formats. I have a number of SAV files that I would like to import into SAS and each have formats that have been created in SPSS. I would like to import these files and retain the formats.

 

From my reading it appears you can import a SAV file which will produce a dataset and format table (if instructed). However when I run the code I only receive the imported dataset, not the format table. Below is my code. 

 

proc import out=work.test1

   datafile='\\DatasetName.sav'

   dbms=SAV replace;

   fmtlib=work.format1;

run;

 

I am wondering what am I missing? Is this a coding issue or have I misunderstood the import process? Any assistance would be appreciated.

 

I am currently using SAS 9.4. I am not in a server environment, rather SAS is running on my local machine.

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Perhaps you've already read the article here on the community about importing SPSS files into SAS.

 

Are the SPSS "formats" defined as true SPSS labels in the source data?  I think that's the mapping that SAS is looking for and that it will bring over for you.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

View solution in original post

2 REPLIES 2
ChrisHemedinger
Community Manager

Perhaps you've already read the article here on the community about importing SPSS files into SAS.

 

Are the SPSS "formats" defined as true SPSS labels in the source data?  I think that's the mapping that SAS is looking for and that it will bring over for you.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
JennieWalker
Fluorite | Level 6

Thanks for your response. I have read the article - which was very helpful - but it didn't seem to solve my problem WRT the format dataset not being generated. The SPSS files are from an external provider so I may need to check how the formats are saved in SPSS.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 2037 views
  • 1 like
  • 2 in conversation