BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jonam
Calcite | Level 5

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.

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

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.

View solution in original post

4 REPLIES 4
data_null__
Jade | Level 19

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.

art297
Opal | Level 21

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.

jonam
Calcite | Level 5

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.

LinusH
Tourmaline | Level 20

agree with Art. Given the small piece of information, I would guess this is job for macros, not formats.

/Linus

Data never sleeps

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 4 replies
  • 1836 views
  • 0 likes
  • 4 in conversation