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 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 23 Oct 2006 05:30:32 -0400
Reply-To:     Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Subject:      Re: How to a value from a table into a global variable?
Comments: To: henry.huiliao@GMAIL.COM

Hi Henry,

Just for purposes of efficiency: now you create the macro variable alphad0 for every record of your sataset minw, every time overwriting the previous one. To improve efficiency do:

data _null_; set minw END=LastRec; IF (LastRec) THEN call symput("alphad0",x&tb1); run;

or rather

data _null_; set minw (FIRSTOBS=LastRec) NOBS=LastRec; call symput("alphad0",x&tb1); run;

If minw only has one record your code and the above code don't differ.

Regards - Jim. -- Jim Groeneveld, Netherlands Statistician, SAS consultant home.hccnet.nl/jim.groeneveld

On Sat, 21 Oct 2006 19:27:27 -0700, henry <henry.huiliao@GMAIL.COM> wrote:

>thanks for everyone's help. finally, after keeping googling, I find an >answer: > >data _null_; > set minw; > call symput("alphad0",x&tb1); >run; > >So, this issue is solved:) [.........]


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