DATA Step, Macro, Functions and more

doubt in label

Reply
Contributor
Posts: 38

doubt in label

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..
SAS Super FREQ
Posts: 8,869

Re: doubt in label

Posted in reply to Sivanandam
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
Contributor
Posts: 38

Re: doubt in label

Posted in reply to Sivanandam
Thanks for you reply..Its answers for my doubt..
Ask a Question
Discussion stats
  • 2 replies
  • 118 views
  • 0 likes
  • 2 in conversation