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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1057 views
  • 0 likes
  • 4 in conversation