Hello, everything,
Is it possible to create a format from the dataset?
Here is my data: 2 variables, 1st one "symptom" is a character variable, 2nd one "category" is numerical.
I want to format category by the value of symptom.
Instead of creating by hand using proc format, is there any easy way to do it? since I have many datasets, like this one.
Symptom category
Anorexia 1
Cachexia 2
Dizziness 3
Fever/Pyrexia 4
Malaise 5
Obesity 6
Orthostatic hypotension 7
Syncope 8
Underweight 9
Thanks a lot!
You add a column to the dataset that will be your format name. Then, you rename the value to LABEL and symptom to START (or vice versa, whichever way you are going). Then proc format with cntlin=ds_name option.
http://www2.sas.com/proceedings/forum2007/068-2007.pdf
Please refer to the doc http://www2.sas.com/proceedings/forum2007/068-2007.pdf
You add a column to the dataset that will be your format name. Then, you rename the value to LABEL and symptom to START (or vice versa, whichever way you are going). Then proc format with cntlin=ds_name option.
http://www2.sas.com/proceedings/forum2007/068-2007.pdf
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.