LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 8 Jun 2001 11:37:07 -0400
Reply-To:     "Diskin, Dennis" <Dennis.Diskin@PHARMA.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Diskin, Dennis" <Dennis.Diskin@PHARMA.COM>
Subject:      Re: Variable values as column labels
Comments: To: Jerry Davis <jwd@GAES.GRIFFIN.PEACHNET.EDU>
Content-Type: text/plain

Jerry,

Unless I misunderstand, this does not make logical sense. The label you are proposing would have a different value for each observation. If however, year1 and year2 are constants, then some macro code could be used to set the label. e.g.

data _null_; call symput('labl',put(year1-year2,best8.)); stop; run;

your data or proc step could then have: label degday ="&labl";

hth, Dennis Diskin

> -----Original Message----- > From: Jerry Davis [SMTP:jwd@GAES.GRIFFIN.PEACHNET.EDU] > Sent: Friday, June 08, 2001 10:49 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Variable values as column labels > > A user asked me if it was possible to use the value generated from an > arithmetic operation in a label statement. Ideally, something like: > > label degday=year1 - year 2; > > So the value of degday would appear as the label, not the string 'year1 > - year2'; > > I think I have seen this done before but couldn't find anything in the > manuals or sample library. For the record, I hate doing this sort of > thing and don't see why people want to change SAS' default output. :) > > Thanks for any help. > > Jerry > -- > Jerry Davis > Experimental Statistics > UGA, CAES, Griffin Campus


Back to: Top of message | Previous page | Main SAS-L page