Date: Tue, 18 Aug 2009 13:22:48 -0500
Reply-To: "Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: concatenating subsequent data lines
In-Reply-To: <fc8a3e6a-542e-4200-a393-8f6908fd4631@r33g2000vbp.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
data test2;
goto do;
set:
set test;
return;
do:
link set;
if line eq 'DATE:' then do;
temp = line;
link set;
substr(temp,15)=left(line);
line = temp;
end;
output;
drop temp;
run;
proc print;
run;
On 8/17/09, Anaconda <rune@fastlane.no> wrote:
> On Aug 17, 5:39 pm, akshaya.nathil...@GMAIL.COM (Akshaya) wrote:
> > Does this help?
> > Data have;
> > length line $15;
> > input @ 'DATE:' line $;
> > newline=cat('DATE: ',line);
> > cards;
> > DATE: 15.06.1998
> > DATE:
> > 17.06.1998
> > DATE:
> > 25.06.1998
> > DATE: 19.10.1998
> > ;
> >
> > AkshayA!
> >
> Not really. Remember, TAKE FOR GRANTED that the data set TEST exists,
> and use it by a SET statement in another dataset. The challenge here,
> is to read one line, evaluate it and eventually do a prosessing which
> involves the NEXT line.
>
|