Hi Vikas,
I followed your work for home work.
I have pasted my work here.
I am not able to understand this following line in the inner loop. Please explain
put "i =" i;
Code.
data Arthritis;
Arth="Strengthening of the muscles around the knee joint may help decrease the
burden on the knee. Preventing atrophy of the muscles is an important part of
maintaining functional use of the knee.Use of a cane or a single crutch is the hand
opposite the affected knee will help decrease the demand placed on the arthritic join
Synvisc may be effective against pain in some patients with knee arthritis and
may delay the need for knee replacement surgery.For some specific symptoms,
it may be helpful.While most patients are not good candidates for this alternative to knee
replacement, it can be effective for young patients with limited arthritis.
Also called a unicompartmental knee replacement, this is replacement of one ";
run;
proc print data=Arthritis;
run;
data split;
set Arthritis;
array split(4) $200;
counter = 1;
do while (length(Arth) > 200);
i = 200;
do while (substr(Arth,i,1) ne " ");
i = i-1;
put "i =" i;
end;
split(counter) = substr(Arth,1,i-1);
counter = counter + 1;
Arth = substr(Arth,i);
end;
split(counter) = Arth;
run;
proc print data=split;
run