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 (December 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 3 Dec 2004 10:55:05 -0600
Reply-To:   "Dunn, Toby" <Toby.Dunn@TEA.STATE.TX.US>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Dunn, Toby" <Toby.Dunn@TEA.STATE.TX.US>
Subject:   Re: by group processing and array
Comments:   To: nageswara punnani <npunnani@rediffmail.com>
Content-Type:   text/plain; charset="iso-8859-1"

<I have learnt something new>

And that is why we are all here to learn something new everyday, o yeah and to help others...

Toby

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of nageswara punnani Sent: Friday, December 03, 2004 10:51 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: by group processing and array

Thanks a lot amit . At the very beginning i had this proc transpose at the back of my mind , but thought may be this is slightly out of reach for that procedure. I have learnt something new about proc transpose today.

Thank you again. Rao.

On Fri, 03 Dec 2004 Dhameja,Amit wrote : >Rao, > >The following proc transpose should work fine for any number of >codenums... > >data test; > > input id date1 mmddyy10. +1 date2 mmddyy10. +4 code $7. +1 codenum; > >cards; > >671 03/26/2004 04/08/2004 996.1 1 > >671 05/03/2004 05/17/2004 427.5 1 > >700 06/25/2003 06/29/2003 531.40 1 > >700 06/25/2003 06/29/2003 578.9 2 > >700 03/15/2004 03/19/2004 786.5 1 > >700 03/15/2004 03/19/2004 V12.51 2 > >700 03/15/2004 03/19/2004 V58.61 3 > > > >run; > > > >proc transpose data=test prefix=code; > > by id date1 date2; > > var code; > > id codenum; > >run; > > >HTH, >Amit > >-----Original Message----- > From: nageswara punnani [mailto:npunnani@REDIFFMAIL.COM] >Sent: Friday, December 03, 2004 11:28 AM >To: SAS-L@LISTSERV.UGA.EDU >Subject: [SAS-L] by group processing and array > > > >hello all , > > i have a data set that looks like this . > > id date1 date2 code codenumber >671 03/26/2004 04/08/2004 996.1 1 >671 05/03/2004 05/17/2004 427.5 1 >700 06/25/2003 06/29/2003 531.40 1 >700 06/25/2003 06/29/2003 578.9 2 >700 03/15/2004 03/19/2004 786.5 1 >700 03/15/2004 03/19/2004 V12.51 2 >700 03/15/2004 03/19/2004 V58.61 3 > >i want to have a dataset like this > >id date1 date2 code1 code2 code3 >671 03/26/2004 04/08/2004 996.1 >671 05/03/2004 05/17/2004 427.5 >700 06/25/2003 06/29/2003 531.40 578.9 >700 03/15/2004 03/19/2004 786.5 V12.51 V58.61 > >and the codenumbers can be more than three within a by group . >depending on the no of codenumbers within the by group of id and date1 >it should assign the no of code(n) variable. any help would be greatly >appreciated. > >Thanks in advance. >Rao.


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