Can the following be implemented? :
A colon preceding a suffix selects with variables with the common suffix, as would select variables AC and BC in the second data step below, without error:
format A: z4.;
format :C z4.;
Colons sandwiching a search term as a use of colon wildcards, as in:
format :E: z5.;
Also see sasnrd.com = Drop or Keep Variables With Same Suffix
In the meantime, you might want to use regular expression parsing and the %VarListPattern macro created by Bruno Mueller and Mark Jordan. See "Use regular expressions to specify variable names in SAS."
Perhaps a better description for this request is common prefix, rather than common suffix. While the colon wild card currently works for suffixes - text following the colon. Prefixes would refer to text preceding the colon.
Common prefixes, I define as, having the same beginning:
length date_begin date_end 8
status_begin status_end $2;
format date_: mmddyy10.
...and a common suffixes, not implemented, are the variables with text matching at their ends:
drop :_end; *hypothetical, for purpose of example;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.