Thanks a lot, I transposed the other dataset and merged it.
i did the below after transpose. when i use the below code it gives error as &i resolves to numeric value
NOTE: Invalid numeric data, SECREAS1='Withdrawal of consent' , at line 1 column 2.
is there anyother way to do this.
%if %upcase(&RptReas.) = ALL %then %do;
desc = "All";
dsreas_num_%scan(&ArmList.,&k., #)=%scan(&ReasLst., &i.);
if dsreas_num_%scan(&ArmList.,&k., #) then do;
dsreas_fmt = " "||&i.;
sort2 = &i.;
output;
end;
%end;
it got resolved to
data work.Disp_Withdraw_w21;
set work.Disp_Withdraw_w2;
if compress(actarm) = "BLINDED" then do;
desc = "All";
dsreas_num_BLINDED = SECREAS1;
if dsreas_num_BLINDED then do;
dsreas_fmt = " "||2;
sort2 = 2;
output;
end;
end;
if compress(actarm) = "PENDING" then do;
desc = "All";
dsreas_num_PENDING = SECREAS1;
if dsreas_num_PENDING then do;
dsreas_fmt = " "||2;
sort2 = 2;
output;
end;
end;
run;
... View more