BookmarkSubscribeRSS Feed
n6
Quartz | Level 8 n6
Quartz | Level 8
I know there is code (and I use it) to tell SAS whether to use the label on one-way PROC FREQ output or whether to use the variable name instead. But here's the (admittedly minor) problem.

One time I'll want to use labels on one-way FREQ output so I'll run the code. Then later I'll be using different data that has no labels and for which having the variable names out the output is fine with me. But since there are no labels, I get no information on the FREQ output...no labels _and_ no variable names. And so I have to go and change the code to tell SAS to show variable names on one-way FREQ output. Then at some point after that I'm doing one-way FREQs on variables that have labels and I have to go and re-run the code _again_ to tell SAS to use labels on one-way FREQ output. Etc.

Is there a way to tell SAS "For one-way PROC FREQ output, use labels if there are labels, or if there are no labels then use variable names?"
1 REPLY 1
stateworker
Fluorite | Level 6
Would you share your code that you use for using the labels for one-way PROC FREQs? Thanks.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 1096 views
  • 0 likes
  • 2 in conversation