67%macro mp_getformats(lib=0
70 ,outsummary=work.mp_getformats_summary
74%local i fmt allfmts tempds fmtcnt;
76%
if "&fmtlist" ne
"0" %then %
do i=1 %to %sysfunc(countw(&fmtlist,%str( )));
78 %let fmt=%scan(&fmtlist,&i,%str( ));
79 %let fmt=%mf_getfmtname(&fmt);
80 %let allfmts=&allfmts &fmt;
83%
if &ds=0 and &lib ne 0 %then %
do;
87%
else %
if &ds ne 0 and &lib ne 0 %then %
do;
89 %let allfmts=%mf_getfmtlist(&lib..&ds) &allfmts;
93%let allfmts=%mf_dedup(%upcase(&allfmts));
96%
if %index(&outsummary,.)=0 %then %let outsummary=WORK.&outsummary;
98create table &outsummary as
99 select * from dictionary.formats
100 where fmtname in (%mf_getquotedstr(&allfmts,quote=D));
102%
if "&outdetail" ne
"0" %then %
do;
104 %mddl_sas_cntlout(libds=&outdetail)
109 if not missing(libname);
111 call symputx(cats(
'fmtloc',x),cats(libname,
'.',memname),
'l');
112 call symputx(cats(
'fmtname',x),fmtname,
'l');
113 call symputx(
'fmtcnt',x,
'l');
116 %let tempds=%mf_getuniquename(prefix=mp_getformats);
118 proc format library=&&fmtloc&i CNTLOUT=&tempds;
122 if 0 then
set &outdetail;
125 by type fmtname notsorted;
126 if first.fmtname then fmtrow=1;
129 proc append base=&outdetail data=&tempds ;