Date: Tue, 26 Sep 2006 00:20:30 -0400
Reply-To: "Dorfman, Paul" <paul_dorfman@MERCK.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Dorfman, Paul" <paul_dorfman@MERCK.COM>
Subject: Re: numbering observations
In-Reply-To: <2fc7f3340609252031s54011129g2378bb035ee2ac0d@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii
Muthia,
I see my chief goal has been reached: I have got someone thinking.
Kind regards
-------------------
Paul Dorfman
Jax, FL
-------------------
-----Original Message-----
From: Muthia Kachirayan [mailto:muthia.kachirayan@gmail.com]
Sent: Monday, September 25, 2006 11:32 PM
To: Dorfman, Paul
Cc: SAS-L@listserv.uga.edu
Subject: Re: numbering observations
Paul M.,
I have 2 more simple variations of earlier posting. The first
prevents the do-loop break and the second has a minor change.
Regards,
Muthia Kachirayan
*First;
data a_need;
do b = 1 by 1 until (a ne .) ;
set a ;
if a then b = 1;
output ;
if b = 1 then a = .;
end ;
run ;
*Second;
data a_need ;
do until (a ne .) ;
set a;
if a then b = 0;
b + 1;
output ;
end ;
run ;
------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and then
delete it from your system.
------------------------------------------------------------------------------
|