The number of variables in the file DEMO in the example from data_null_ is unlimited and no change is needed to support whatever data you already have. To make the number of "reference" variables larger use array processing. It will work better if you set fixed number, but you can also calculalate the number in a previous step (without having to read the actual data, just the metadata). %let numref=100; data ref(keep=id ref:); merge name demo; by id; array names name: ; array ref (&numref) $64; do i=1 to dim(names); ref(i) = vvaluex(names(i)); end; run;
... View more