And an approach using Proc Format:
Proc sql;
create table listcntlin as
SELECT DISTINCT NUMR_PESSOA as start,'Match' as Label
,'MyList' as Fmtname, 'N' as type
FROM WORK.QUERY_LISTA_EMISSORES;
proc format library=work cntlin=listcntlin;
run;
data example;
set somedataset;
where put(variable,Mylist.)='Match';
run;
proc sql;
create table example2 as
select *
from somedataset
where put(variable,Mylist.)='Match'
;
quit;
If you need the same list of values then make that a format in a permanent library in your FMTSEARCH path. If not, then this goes away at the end of your session like macro variables. And does not hit the macro space at all.
... View more