68%macro mp_getformats(lib=0
71 ,outsummary=work.mp_getformats_summary
75%local i fmt allfmts tempds fmtcnt;
77%
if "&fmtlist" ne
"0" %then %
do i=1 %to %sysfunc(countw(&fmtlist,%str( )));
79 %let fmt=%scan(&fmtlist,&i,%str( ));
80 %let fmt=%mf_getfmtname(&fmt);
81 %let allfmts=&allfmts &fmt;
84%
if &ds=0 and &lib ne 0 %then %
do;
88%
else %
if &ds ne 0 and &lib ne 0 %then %
do;
90 %let allfmts=%mf_getfmtlist(&lib..&ds) &allfmts;
94%let allfmts=%mf_dedup(%upcase(&allfmts));
97%
if %index(&outsummary,.)=0 %then %let outsummary=WORK.&outsummary;
99create table &outsummary as
100 select * from dictionary.formats
101 where fmtname in (%mf_getquotedstr(&allfmts,quote=D));
103%
if "&outdetail" ne
"0" %then %
do;
105 %mddl_sas_cntlout(libds=&outdetail)
110 if not missing(libname);
112 call symputx(cats(
'fmtloc',x),cats(libname,
'.',memname),
'l');
113 call symputx(cats(
'fmtname',x),fmtname,
'l');
114 call symputx(
'fmtcnt',x,
'l');
117 %let tempds=%mf_getuniquename(prefix=mp_getformats);
119 proc format library=&&fmtloc&i CNTLOUT=&tempds;
123 if 0 then
set &outdetail;
126 by type fmtname notsorted;
127 if first.fmtname then fmtrow=1;
130 proc append base=&outdetail data=&tempds ;