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.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

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.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
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-white.png

Special offer for SAS Communities members

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.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 3915 views
  • 1 like
  • 2 in conversation