Date: Tue, 29 Mar 2005 11:32:56 -0500
Reply-To: Venita DePuy <depuy001@NOTES.DUKE.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Venita DePuy <depuy001@NOTES.DUKE.EDU>
Subject: Re: Keep First and Last Obs in a Macro
In-Reply-To: <200503291630.j2TGUpfp011571@listserv.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"
How about:
Data file2;
set file1;
by sortvar;
if first.sortvar or last.sortvar;
(untested)
Venita
Lori Lesnick <lorilesnick@FINANCIAL.WELLSFARGO.COM>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
03/29/2005 11:30 AM
Please respond to
Lori Lesnick <lorilesnick@FINANCIAL.WELLSFARGO.COM>
To
SAS-L@LISTSERV.UGA.EDU
cc
Subject
Keep First and Last Obs in a Macro
Hi all,
I have a dataset with n = 33000+ observations. I need a way to retain the
First value of a specific variable and the last value of the same variable
into a macro that I can reference later in my program.
Any help will be appreciated!
Thanks,
Lori