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 (October 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 27 Oct 2008 18:43:06 -0400
Reply-To:   Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:   Re: Creating SAS dataset with one Variale
Comments:   To: SUBSCRIBE SAS-L Chandra Gadde <ddraj2015@GMAIL.COM>

Chandra,

If I correctly understand what you are trying to achieve, my only question is are there multiple years in your file, or just one. The following is all you would need for one record:

data have; input year; cards; 2008 ;

data want; set have; do year=year-14 to year; output; end; run;

HTH, Art --------- On Mon, 27 Oct 2008 17:42:35 -0400, SUBSCRIBE SAS-L Chandra Gadde <ddraj2015@GMAIL.COM> wrote:

>All, > >I have a variable called year=2008. I need to create a dataset with one >column (namely yr) and whose values should be given below. For example, if >the value of year is 2009, it has to create a dataset with a yr column that >should have values from 1995 through 2009. Could you please tell me how I >can get this? > >Thanks. > >yr >1994 >1995 >1996 >1997 >1998 >1999 >2000 >2001 >2002 >2003 >2004 >2005 >2006 >2007 >2008


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