Date: Fri, 29 Jan 2010 14:42:59 -0400
Reply-To: Muthia Kachirayan <muthia.kachirayan@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Muthia Kachirayan <muthia.kachirayan@GMAIL.COM>
Subject: Re: Data Sets - Split
In-Reply-To: <201001291643.o0TBkqNc015374@malibu.cc.uga.edu>
Content-Type: text/plain; charset=windows-1252
Swamy,
You may play with 9.1 hash if you like.
data _null_;
if 0 then set x;
declare hash h();
h.definekey('week');
h.definedata('week','freq','cumfreq');
h.definedone();
set x;
h.add();
h.output(dataset:'week_' || put(week, best. -L));
run;
On Fri, Jan 29, 2010 at 12:43 PM, SAS Swamy <sasswamy@gmail.com> wrote:
> Hello,
>
> I have a data sets with 10 observation :
> Week frequency Total_count
> 0 1 1
> 11 3 4
> 22 6 10
> 15 2 12…..
>
> I wanted to create each observation as one data set , I mean
> Week_0 , will contain the observation with the value week = 0
> Week_11 will contain the observation with the value week = 11
> …etc , so finally I will have 10 data sets ..
>
> Can someone please advice how to this break up
>
> Thanks
> - Swamy
>
|