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 (May 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 2 May 2005 07:11:20 -0400
Reply-To:     diskin@alum.rpi.edu
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Dennis Diskin <ddiskin@GMAIL.COM>
Subject:      Re: Append Datasets and add an additional variable
Comments: To: sa polo <solouga2@rediffmail.com>
In-Reply-To:  <20050502020507.13335.qmail@webmail50.rediffmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Sa,

Something like the below untested code should do it. This could be put in a macro to make it easier for various months.

data abcdjan05; set abcd01jan05(in=_in1) abcd02jan05(in=_in2) ..... abcd31jan05(in=_in31) ; array _in(31); retain _day 1; do while (not _in(_day)); _day + 1; end; rundate = mdy(1,2005,_day); drop _day; run;

HTH, Dennis Diskin

On 5/1/05, sa polo <solouga2@rediffmail.com> wrote: > Hi All, > > I have a bunch of datsets like ---- > abcd01jan05 > abcd02jan05 > abcd04jan05 > abcd05jan05 > I need to read all these datasets into one dataset say abcdjan05(this dataset does not exist), > an additional variable called rundate needs to be added to > the abcdjan05 dataset which has the date(01jan05 02jan05......) from each of the datasets along with the other variables already present in the datasets so that we know the origins of each variable. > > Any help is much appreciated as always. > > Thanks > Sa > > >


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