DATA Step, Macro, Functions and more

simple problem with labeling variables

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

simple problem with labeling variables

Hi,

I am struggeling in labeling a simple variable in my output file. It always uses the variable name instead of the label. My code is:

PROC PRINT;

    LABEL icd_n = 'Sum Diagnoses';

    VAR icd_n;

run;

What did I do wrong in order to make SAS use the variable name in the output file?

Best,

Dennis


Accepted Solutions
Solution
‎03-24-2013 12:47 PM
Frequent Contributor
Posts: 97

Re: simple problem with labeling variables

hi,

May be it is problem with quotes ....in the line...

LABEL icd_n = 'Sum Diagnoses';...................should like...


LABEL icd_n = Sum Diagnoses;


Regards


ALLU

View solution in original post


All Replies
Solution
‎03-24-2013 12:47 PM
Frequent Contributor
Posts: 97

Re: simple problem with labeling variables

hi,

May be it is problem with quotes ....in the line...

LABEL icd_n = 'Sum Diagnoses';...................should like...


LABEL icd_n = Sum Diagnoses;


Regards


ALLU

Respected Advisor
Posts: 3,799

Re: simple problem with labeling variables

I think your label statement is correct but don't you need to tell PROC PRINT to use variable labels for column header.  PROC PRINT statement option LABEL.

Occasional Contributor
Posts: 10

Re: simple problem with labeling variables

Posted in reply to data_null__

Yes, thanks for your replies, its working now.

🔒 This topic is solved and locked.

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

Discussion stats
  • 3 replies
  • 184 views
  • 0 likes
  • 3 in conversation