If I understand properly, you are overcomplicating the problem. It seems you have a separate table with 23 observations, and want to retrieve a value from that table based on a number going from 1 to 23. For that:
data want;
do k=1 to 23;
set other_table point=k;
output;
end;
stop;
run;
The STOP statement is important for this example, preventing an infinite loop in the DATA step. It may be OK to remove it in a more complex DATA step that has a guaranteed ending.
There are other approaches possible as well, such as reading the other table into a temporary array:
data want;
array factors {k} _temporary_;
if _n_=1 then do k=1 to 23;
set other_table;
factors{k} = cs_factor;
end;
set have;
.... retrieve values from the _temporary_ array as needed ....
run;
... View more