Date: Tue, 14 Nov 2006 12:24:54 -0800
Reply-To: MikeInWV <mikeslover@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: MikeInWV <mikeslover@GMAIL.COM>
Subject: Re: Creating multiple datasets from one dataset based on value of
Content-Type: text/plain; charset="us-ascii"
Thanks to Mark and & Ya for their code. I made some modifications to
Ya's code in particular and worked extremely well. Luckily for me the
data was pretty easy to sort! On a subset of data it created 50 some
permanent datasets just like I want.
Mark- thanks for your understanding. Toby- I do have a choice in not
creating company level datasets but in my situation it works best to
break it up into smaller pieces for the inevitable questions and edits.
And if I'm lucky, I'll pick up another 200 companies in the next week!
toby dunn wrote:
> Mark ,
> I said it shouldnt be done, not that it should never be done. Your point 1
> and 2 are valid I will concede those points, some times you just have to do
> what the boss and/or client wants, been there done that. On the otherhand
> (geez I sound like Daivd) it still doesnt mean it should be done that way,
> it is just the programmer has no choice in the decision. If it is just
> because a person thinks it will make their life easier or they dont know any
> other way then a redesign of the code or rethinking of their process is in
> order. Which is the point I was making albiet probably not nearly as clear
> as I should have.
> Now the call execute thingy might or might not work. Depends on the number
> of discrete values which will have to be muliplied by no less than three (
> number of lines of code to subset the data one time ). This could put too
> much on the stack and SAS will poop out. Or one could wrap the three lines
> of code into a macro and use call execute delaying the macro execution until
> it is popped off of the stack ( one line of code for each descrete value) if
> it is more than SAS can handle SAS will poop out again. Or one could
> simply write the code to a file and %include that back into the program.
> All I can say is I am sure glad as hell I dont have to mess around with 200
> datasets for one project, the nightmares alone would keep me up late at
> Toby Dunn