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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 2 replies
  • 336 views
  • 1 like
  • 2 in conversation