BookmarkSubscribeRSS Feed
Sivanandam
Calcite | Level 5
data test9;
input name $ gender $ age;
label name = 'fullname';
datalines;
siva m 12
raja f 45
asdf m 60
ardfd f 2
;
run;

when i run this program in sas mainfrme am not getting any error or warning b ut am not getting the label name as fullname in the output ..Could any one help me..
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi:
Not all procedures use the variable label automatically. In addition whether labels are displayed or not could be impacted by the system option NOLABEL, as explained in this Tech Support note:
http://support.sas.com/kb/14/973.html

If you use PROC PRINT, for example, and you had the label option turned on in the internal syntax:
[pre]
proc print data=work.mydata label;
...
run;
[/pre]

You should see the label used in the output. If you do NOT see the label used in the output, then you might want to explicitly turn on the system option:
[pre]
options label;
[/pre]

and re-run the PROC PRINT.

Also, you say that you are "not getting the label name as fullname in the output"; however, you program is only creating WORK.TEST9 -- I don't see any PROC PRINT, PROC REPORT, PROC TABULATE or PROC ???? that would be creating "output" -- to see whether the label is in the descriptor portion of the SAS dataset, you would have to run PROC CONTENTS, at least.

Where do you expect to see the label "fullname"??? In the dataset?? In the SYSOUT DD??? The SAS Log DD??? In PROC PRINT output??? Without seeing ALL of your code, it is hard to figure out where the LABEL statement is not being used.

cynthia
Sivanandam
Calcite | Level 5
Thanks for you reply..Its answers for my doubt..

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

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
  • 921 views
  • 0 likes
  • 2 in conversation