Date: Tue, 28 Apr 2009 06:06:40 -0400
Reply-To: Søren Lassen <s.lassen@POST.TELE.DK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Søren Lassen <s.lassen@POST.TELE.DK>
Subject: Re: help
Content-Type: text/plain; charset=ISO-8859-1
I would recommend using a SAS date; as I suppose you are
working with data representing consecutive months, that
would make the program easier to understand:
data want;
set have;
/* a date from the latest month before */
retain __date '31dec2005'd;
__date=intnx('month',__date,1);
year=year(__date);
drop __date;
run;
Regards,
Søren
On Mon, 27 Apr 2009 03:18:07 -0400, Shaik Hymad <hymadsk@GMAIL.COM> wrote:
>HI TO ALL,
>
> I HAVE ONE DATASET HAVING 39 OBSVERVATIONS ... SO I NEED TO OUTPUT
LIKE
>
> 1 TO 12 OBS I NEED TO CREATE ANOTHER VARIBLE VALUE 2006
> 13 T0 24 OBS I NEED TO CREATE ANOTHER VARIBLE VALUE 2007
> 25 TO 36 OBS I NEED TO CREATE ANOTHER VARIBLE VALUE 2008
> SO ON..
>
>OBS YEAR
>1 2006
>2 2006
>.
>.
>.
>12 2006
>13 2007
>.
>.
>24 2007
>25 2008
>.
>.
>36 2008
>37 2009
>
>HOW TO GET THIS OUTPUT IN DATASTEP...
>PLEASE LET ME KNOW IF U KNOW THIS SOLUTION
|