Help using Base SAS procedures

proc format - to - sas if else conditional code

Accepted Solution Solved
Reply
Contributor
Posts: 29
Accepted Solution

proc format - to - sas if else conditional code

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.


Accepted Solutions
Solution
‎09-08-2011 05:07 PM
Respected Advisor
Posts: 3,799

proc format - to - sas if else conditional code

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


All Replies
Solution
‎09-08-2011 05:07 PM
Respected Advisor
Posts: 3,799

proc format - to - sas if else conditional code

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.

PROC Star
Posts: 7,492

proc format - to - sas if else conditional code

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.

Contributor
Posts: 29

proc format - to - sas if else conditional code

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.

Super User
Posts: 5,438

proc format - to - sas if else conditional code

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

/Linus

Data never sleeps
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

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