DATA Step, Macro, Functions and more

Variable Labels

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

Variable Labels

[ Edited ]

Hi Guys,

 

I am using the LABEL statement to assign variable labels.

 

However, when I run PROC PRINT the variables are still labeled with the abbreviated acronyms.

 

My understanding is that labels will only be printed along in certian procedures such as PROC FREQ or PROC MEANS.

 

Any insight into why would be much appreciated?

 

libname final '/folders/myfolders/final';
data final.merged_data;
set merged_data;
format DATE YYMMDD6. DAY BP CD DM JY SF;
label DATE="DATE" DAY="DAY" BP ="BRITISH POUND" CD="CANADIAN DOLLAR" DM="DEUTSCHE MARK" JY="JAPANESE YEN" SF="SWISS FRANC";
run;

proc print data=final.merged_data;
run;


Accepted Solutions
Solution
‎11-02-2015 08:52 AM
Trusted Advisor
Posts: 1,131

Re: Variable Lables

I believe we need to use the label option to print the labels via proc print

 

proc print data=final.merged_data label;
run;

Thanks,

jag

Thanks,
Jag

View solution in original post


All Replies
Solution
‎11-02-2015 08:52 AM
Trusted Advisor
Posts: 1,131

Re: Variable Lables

I believe we need to use the label option to print the labels via proc print

 

proc print data=final.merged_data label;
run;

Thanks,

jag

Thanks,
Jag
New Contributor
Posts: 3

Re: Variable Lables

Hi,

To view the label in your report you have to label option in "PROC PRINT" procedure

 

ex:

proc print data=final.mergerd label;

run;

Occasional Contributor
Posts: 9

Re: Variable Lables

Thanks Jag!

☑ This topic is solved.

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

Discussion stats
  • 3 replies
  • 463 views
  • 6 likes
  • 3 in conversation