Hi @PGStats , Thank you. After using your code and modifying it a bit, I was able to create 2 tables I like how I wanted. However, after doing work on those 2 tables, now I need to combine them back to get the original table. Could you please help me on how to get this done? Here is the code I'm currently using and its result. Now I need to combine table 2 and 3 back to table 1. proc print data = have noobs; run;
/*Separate upgrade notch*/
data below;
set have;
array to{*} _numeric_;
_i = _n_;
do _j = _i to 1 by -1;
to{dim(to)+_j-_i} = to{_j};
end;
do _j = dim(to)-_i to 1 by -1;
call missing(to{_j});
end;
drop _: ;
run;
data upgrade (drop = r1-r17 i);
set below;
array u(*) u1-u16;
array r(*) r1-r17;
do i = 1 to 16;
u(0 + i) = r(16 + 1 - i);
end;
format u1-u16 percent10.4;
run;
proc print data = upgrade noobs; run;
/*Separate downgrade notch*/
data above;
set have;
array COLS [*] r1 - r17;
do ITER=1 to dim(COLS);
if ITER=<_N_ then COLS[ITER]=.;
end;
output above;
drop ITER;
run;
data downgrade (drop=r1-r17 j i);
set above;
array in r1-r17;
array out d1-d17;
j=1;
do i=1 to 17;
if in(i) ne ' ' then do;
out(j)=in(i);
j+1;
end;
end;
drop d17;
format d1-d16 percent10.4;
run;
proc print data = downgrade noobs; run;
... View more