Add you own logic to "fix" the format that is attached. Here is code that truncate the long the format names. If you use the NOFMTERR option then it will run. Of course if these truncated formats do not exist then you will have a different issue to solve. Perhaps you could also have code that renames the format definitions.
%let inlib=WORK;
%let outlib=OUT;
%let member=TEST;
proc sql noprint;
select catx(' '
,name
, cats(case when (type='char') then '$'||substr(format,3,7) else substr(format,1,8) end,'.')
)
into :reformat separated by ' '
from dictionary.columns
where libname=%upcase("&inlib") and memname=%upcase("&member")
and length(format)>8
;
%let n=&sqlobs;
quit;
data &outlib..&member;
set &member;
%if &n %then %do;
format &reformat ;
%end;
run;
... View more