Date: Mon, 27 Dec 2010 01:11:50 -0500
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: Is there an easier way to solve this?
Content-Type: text/plain; charset=ISO-8859-1
How about this:
length firstname lastname address $20 city $40 state $2 zip $5;
informat zip state city $revers.;
input firstname lastname /
Address & /
input zip state city &;
33 10 Av.
Uptown, Smalltown XX 12345
On Sun, 26 Dec 2010 11:07:11 -0500, Arthur Tabachneck <art297@ROGERS.COM>
>The following was a question that was raised on the SAS discussion forum.
>You are confronted with data that has 3 lines per subject, but the third
>line has variables that may contain embedded spaces, but there is only one
>space between variables.
>The only suggestion I could think of was the one shown below. Is there an
>data work.Address (drop=_:);
> infile cards;
> input FirstName $ LastName $ /
> Address $ 1 - 20 /
> _Third_Line & $80.;
> format City $10.;
> call scan(_Third_Line, -2, _position, _length);
>1215 Raintree Circle
>New York NY 85044
>1751 Diehl Road
>Vienna VA 22124
>Thanks in advance,