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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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