Further to the above code i also need to set up a condition. If condition=1 then split by 1:1(half) and if condition=2 then split equally.
example for cond 2 if the value is 42 then it should be 42 for all the 3 columns.
Can any one help how to do in this code.
data want;
set have;
array sp{3} 8.;
do i=1 to countc(split,":")+1;
sp{i}=input(scan(split,i,":"),best.);
end;
totsplit=sum(of sp{*});
main_treat=put((no_of_subj / totsplit) * sp{1},best.);
comparator1=put((no_of_subj / totsplit) * sp{2},best.);
comparator2=put((no_of_subj / totsplit) * sp{3},best.);
run;
... View more