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 (June 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 31 May 2007 23:21:22 -0700
Reply-To:     cparatte <christophe@PARATTE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         cparatte <christophe@PARATTE.NET>
Organization: http://groups.google.com
Subject:      Re: Dataset iteration
Comments: To: sas-l@uga.edu
In-Reply-To:  <BAY103-F40FDDBB9C4875BC0CBC120B02C0@phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"

On 1 juin, 04:46, davidlcass...@MSN.COM (David L Cassell) wrote: > christo...@PARATTE.NET wrote: > >Hi all > >I have read a lot about dataset iteration here but i still have a > >question : > >is it possible to navigate in a dataset ? For example, i would like to > >have a For Loop in which i can navigate to my dataset line[i], [i-1] > >and [i+1] like in VB, C# or another language. > >My problem is : > >I have a dataset with multiple case_id which in turn may have multiple > >offence_id with multiple item_id. I want to group them by case_id, a > >certain type of offence_id and with a precise type of item_id in one > >line... In fact changing the multiple lines in multiple fields for one > >line. > > >Thanks in advance > > >Christophe Paratte > >www.paratte.net > > First, people often use PROC TRANSPOSE to take your originally > well-structured > data and turn it into a hideous nightmare that becomes harder and harder to > work with as you progress through your process. I recommend that you not > do that. > > Second, SAS actually provides a *ton* of ways to navigate through a > data set and look for other records. The POINT= option is one thing > you may already have seen. It lets you 'point' at records by record number. > > But there are a lot more ways of working with your data set, so POINT= might > not be the best choice. It really depends on what you are trying to do. > It may be that you are really looking for table look-up methods. If so, > there is an entire paper or two by Art Carpenter in the SUGI archives at > sas.com or lexjansen.com . Or perhaps you want a clever way to work > thorugh your by-groups. by-processing might be what you want, or perhaps > you would benefit from the intensive code of "The Magnificent DO" by Paul > Dorfman, which can be found at Richard Devenezia's website. Then there's > hashing, the Whitlock do-loop, the Schreier Self-Interleave, and any number > of creative ways of using PROC SQL to access your data. > > So not only are there tons of choices here, but there's no way I can tell > you what would be a really good choice for your data, unless you write back > to SAS-L and explain your problems a lot more thoroughly. > > HTH, > David > -- > David L. Cassell > mathematical statistician > Design Pathways > 3115 NW Norwood Pl. > Corvallis OR 97330 > > _________________________________________________________________ > Don't miss your chance to WIN $10,000 and other great prizes from Microsoft > Office Livehttp://clk.atdmt.com/MRT/go/aub0540003042mrt/direct/01/- Masquer le texte des messages précédents - > > - Afficher le texte des messages précédents -

Hi David Thank you very much for your answer. I will read these documentations you gave me. I am programming SAS for only 3 months so I do not have much experience.

Have a good day

Christophe Paratte www.paratte.net


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