From: Matthew Pettis on
Hi,

=20

I know that you can use a colon wildcard with a prefix in a drop
statement (among others) to get a list of things with a common prefix.
For example, if I have a dataset work with the columns:

=20

X

Y

ID_A

ID_B

Z

=20

And issue:

=20

Data work;

Set work;

Drop ID_:;

Run;

=20

Then only the vars X, Y, and Z will be left in work, and ID_A and ID_B
will be dropped.

=20

I, however, have the case where the variable names are like:

=20

X

Y

A_ID

B_ID

Z

=20

But the natural construct that follows does not work:

=20

Data work;

Set work;

Drop :_ID;

Run;

=20

Is there some idiom/syntax that allows me to wildcard based on a common
suffix, rather than a common prefix with the colon wildcard?

=20

Thanks,
Matt