Hi,
I have to convert a sas file to spss . The original sas dataset can only be opened after a proc format statement is run to account for the new formats. After that , I am able to open the sas dataset. Can this dataset then be converted to a spss file using the following program
get sas data='c:\sas\data\class.xpt'.
execute.
How can I ensure proper conversion. Please advice on the steps.
Thanks!
@Reeza, I am working in sas.
The unformatetd varibale is not present for this variable in the dataset. That's the reason for my concern. I will have to create a new one representing the unformatted one and then transfer. Would that be a good step?
Thanks. Then I will make sure to have it. I have one more question. For the variable 'title' with the format...I have to run the proc format statement first. Say the format name for it is 'west'. After I run the proic format then only I am able to open the sas dataset in lib=work. If not it triggers a message saying
NOTE: Format WEST was not found or could not be loaded.
NOTE: There were 437 observations read from the data set WORK.ORIGINAL.
NOTE: The data set WORK.TEMP has 437 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
When I run a proc contents on work.temp I see the format 'west' listed against the vairiable 'title'. However, when I look at the column attributes of the variable in the dataset, the format is listed as BESTX12.
What is 'bestx12.' ? Please let me know.
Please ignore my alst question. Thanks for your help.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.