LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 5 Feb 2006 16:41:33 -0800
Reply-To:     "data _null_;" <datanull@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "data _null_;" <datanull@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: Charllenging question: How to Pass a Parameter Across the
              Records
Comments: To: sas-l@uga.edu
In-Reply-To:  <20060205211022.76517.qmail@web36808.mail.mud.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Here is one way to get the next value of renew. Not fancy.

data work.test; input ID1 ID2 FLAG:$2. PAYMENT BALANCE RENEW; cards; 1001 101 A1 100 1000 500 100 <<<RECORDS OMITTED>>> 1001 103 A2 1600 0 400 1600 ;;;; run; proc sort nodupkey data=work.test(keep=id1 id2 renew) out=renew; by id1 id2; run; data work.renew; set work.renew; by id1; nextID2 = lag(id2); if first.id1 then delete; drop id2; rename nextID2=ID2 renew=nextRenew; run; data work.test; merge work.test work.renew; by id1 id2; run;

proc print; run;


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