Date: Sun, 10 May 2009 20:25:22 -0400
Reply-To: Wensui Liu <liuwensui@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Wensui Liu <liuwensui@GMAIL.COM>
Subject: keep value from previous iteration
Content-Type: text/plain; charset=ISO-8859-1
Dear All,
I know it is relatively simple but just can't find an elegant and
simple solution with retain statement.
here is what I have.
1
2
3
4
here is what i want
1
2 1
3 2
4 3
I don't want to use lag() function or hash and just want to know a way
in datastep with retain.
thank you so much!
--
==============================
WenSui Liu
Acquisition Risk, Chase
Blog : statcompute.spaces.live.com
Tough Times Never Last. But Tough People Do. - Robert Schuller
==============================
|