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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.