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

I'm applying permanent labels to variables in a data step (at the very end):

 

/* Labels */
Label
YY4_="Year"

RACE2="Race/Ethnicity"
age="Age Group"
FPL="Federal Poverty Level"
Urban="Urbanicity"
Married="Marital Status"
edu="Education"

mvitamin="Any Multivitamin Use"
pre_diet="Dieting to Lose Weight"
pre_exer="Exercise Three+ Days Per Week";

 

But when I run the proc surveyfreq using this dataset, the labels are not applied. 

I've checked to ensure the options label wasn't turned off. And when I run proc contents, the labels are output as information about the dataset. I've also tried closing out the program entirely, re-opening it, and running it again. 

I don't see anything unusual in the log, either. 

1 ACCEPTED SOLUTION

Accepted Solutions
maguiremq
SAS Super FREQ

I don't have much experience with PROC SURVEYFREQ, but have you checked the documentation?

 

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_surveyfreq_syntax01.htm

 

Look at the VARHEADER = LABEL option there. That might be it?

View solution in original post

2 REPLIES 2
maguiremq
SAS Super FREQ

I don't have much experience with PROC SURVEYFREQ, but have you checked the documentation?

 

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_surveyfreq_syntax01.htm

 

Look at the VARHEADER = LABEL option there. That might be it?

SAS93
Quartz | Level 8
THANK YOU! That worked! I've never had to use that before; I've added labels periodically under the same circumstances (proc surveyfreq) and it's worked just fine. I will definitely be noting this down.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 821 views
  • 1 like
  • 2 in conversation