Libraries, not folders. If you think "assign a library" to each folder, or if the data set names are not duplicated in any of the folders, then this is trivial to select the data sets containing any given variable (or list of variables). If you have lots of sets it may take a bit of time.
After the libraries are assigned:
proc sql;
create table thisvar as
select libname, memname, name
from dictionary.columns
where upcase(name)='NAMEOFVARYOUWANT'
/* or if there are multiple variables */
/* where upcase(name) in ('THISVAR' 'THATVAR' 'OTHERVAR') */
;
run;
The set Work.THISVAR will have the names of all libraries and data sets with the variable name(s) desired.
The dictionary.columns does not store the names of variables in fixed case so I use the UPCASE function to get the variable regardless of which case the name was created with.
Your bit about "row level security" column bit needs more explanation. It sounds like you expect to ADD a variable (and what values would that be) and you have provided zero information about where/how any of that is kept for use.
... View more