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
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.
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.
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.
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.