Hi,
there are some variables in my dataset that have the same name at the last 3 letters.
For example: ABC_123, BCD_123, CBB_123, GHJ_123, --- and more
I wonder how to code the simple way in the "keep" statement in order to keep all the variables.
For example:
data want;
set data (keep = :123 ); -- I try to do this, but it did not work.
run;
if only a small amount of variable, I defenitely can just write the full name of the variable (keep=ABC_123 BCD_123), but if I want more variables with the same 3 last letters, the "keep" statement will be very long.
is it a way to simplify the code?
can anyone show me how to code it?
Thank you very much in advance.
... View more