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 (October 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 19 Oct 2007 10:58:31 -0500
Reply-To:     "data _null_," <datanull@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "data _null_," <datanull@GMAIL.COM>
Subject:      Re: processing sas dataset label values??
Comments: To: Master Chief Petty Officer John-117 <rifazrazeek@gmail.com>
In-Reply-To:  <1192808044.325385.278900@i13g2000prf.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1

It would be helpful to know you objectives a bit more.

The follow is an example of how one "might" access data in variable labels are run time. Since these values cannot change you should only execute the assignments one time and then retain the values.

62 data _null_; 63 attrib salary1 length=8 label="Raise 23%"; 64 attrib salary2 length=8 label="Raise 18%"; 65 attrib salary3 length=8 label="Raise 25%"; 66 call missing(of _all_); 67 68 pct1 = input(scan(vlabel(salary1),-1,' '),percent.); 69 pct2 = input(scan(vlabel(salary2),-1,' '),percent.); 70 pct3 = input(scan(vlabel(salary3),-1,' '),percent.); 71 put _all_; 72 run;

salary1=. salary2=. salary3=. pct1=0.23 pct2=0.18 pct3=0.25 _ERROR_=0 _N_=1

On 10/19/07, Master Chief Petty Officer John-117 <rifazrazeek@gmail.com> wrote: > Is there a way to retreive values from dataset labels for > processing... > > i.e. > > i have a dataset being generated.. as below.. > > > varname salary1 salary2 salary3 > var label "Raise 23%" "Raise 18%" "Raise 25%" > > person 1 x x x > person 2 x x x > person 3 x x x > > i wanna retreive the values in labels (i.e. 23%, 18%, 25% etc... ) for > processing.. > into a dataset or macro variables... > > so i can do something like this.. > > new label for salary 1 = 23+2 --> 25%... so "Raise 25%" > > any advice is of great help.. many thanks >


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