|
Ya,
Would something like the following suffice or does it fit into the
category you would like to avoid?
data _null_;
infile cards truncover;
informat a $100.;
input a &;
do i=1 to 99;
x= scan(a,i,"/");
if x eq "" then i=99;
else put x;
end;
cards;
first line / second line
first line / second line/third line
;
Art
--------
On Fri, 22 Jan 2010 14:28:49 -0500, Ya Huang <ya.huang@AMYLIN.COM> wrote:
>Hi there,
>
>I have a long string, which has one or more '/' in between the letters,
>is there a way to use put statement and get two lines?
>
>9 data _null_;
>10 a='first line / second line';
>11 put a=;
>12 run;
>
>a=first line / second line
>NOTE: DATA statement used (Total process time):
>
>I would like the following though:
>
>a=first line
>second line
>
>I can certainly break the string apart, and use put like this
>put st1 / st2 / st3...
>Just wondering if it can be done more easily like split='/' in proc
>report?
>
>Thanks
>
>Ya
|