LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 1 Feb 2002 06:22:25 GMT
Reply-To:   Huck <huck@SKIPTHISFINN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Huck <huck@SKIPTHISFINN.COM>
Organization:   AT&T Worldnet
Subject:   Re: Is set with point option the answer?

yes point= can be very usefull. but it involves an i/o style that can be very costly. often it is only recomended if you plan to access less than 25% of the observations. my experiences say maybe less than 15% is better.

a method i HATE, cuz its kinda misleading, and is always messy when i find it goes like this.

data something; retain switch 0; if switch=0 then do; set somethingelse; /* maybe even in a do loop, maybe with point or _end */ if some.clue.tells.us = true then switch=1; end; else do; set somethingelse; /*the structure here will be the same as above we hope*/ if some.clue.tells.us = true then switch=0; end; run;

o'course this wont run, but any fan of (solid) state-machines sees whats going on. and many dont realize the differnt set statements are independent, (ie the set a; set a(firstobs=2 rename=()); "trick" for forward lags.... )

and IF whatever the clue is that switches states happens offen enuf, THAT all the data for a "clump" stays in the operating system buffers, (they are independent, bufno has to be set for both of them) THEN the two SAS i/o streams converge on a single OS buffer stream.. and it can scream useing the fast sequential i/o method ...... vrooooooom...

this method may be your best bet if you plan to scan MOST of the records on each pass.

mostly it gets messed up somehow and has turned into a dog by the time i see them. be carefull.

(did i say this, i mean i hate this trick.... ) On 31 Jan 02 20:15:51 GMT, rob@AECHIDNA.COM (Rob James) wrote:

>I have large datasets of transations, typically unindexed but sorte by ID >and date. Within the subset of records for >individual i, I need to be able to (minimally) pass >through the data twice, and potentially to pass through the >data multiple times - with the number of times determined >by what I find in the first pas of the data. > >In another language, I would just know the record numbers, and manipulate >the index, but SAS does not seem to like this - implicit do loops and all, > >so.... what are the current strategies that people use. Someone suggested >the set command with the point option. > >Thanks


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