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
SAS Super FREQ
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..

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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