My objective is to create if/else code from the proc format. 1. Does anyone know if sas stores the way it stores the metadata(i mean like sashelp.columns). I just want to know if there is an easy way to do this instead of parsing the code? Have anyone experienced similar requirement? Any help on this will be really appreciated.
The PROC FORMAT CNTLOUT= data set contains all the info you will need to code gen IF/THEN or SELECT/WHEN statements for any value label format.
The PROC FORMAT CNTLOUT= data set contains all the info you will need to code gen IF/THEN or SELECT/WHEN statements for any value label format.
Data_null has already provided your answer, but I have to ask a question: what are you trying to accomplish? One can usually to format related tasks a lot easier by simply making use of the formats.
Good question!
I need to send a specification based on sas code to a person who doesn't work in sas. I mean i need to provide more generic way to the person who programs this in different language.
Also i need to more explicity mention "missing". The other implicitly gives the values in my case.
agree with Art. Given the small piece of information, I would guess this is job for macros, not formats.
/Linus
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.