You have to check your where condition, if it can find any matches at all. Does your format on its own return any results? I ask because I can't find documentation for a IS8601DT format.
And no macro is needed, by group processing in the data step will do it:
%let libname=XXX;
%let dateformat=E8601DT19.;
data _null_;
set sashelp.vcolumn (
where=(libname="&libname." and format = "&dateformat.")
);
by memname;
if first.memname then call execute("data &libname.." !! strip(memname) !! "; set &libname.." !! strip(memname) !! ';');
call execute(name !! '=datepart(' !! name !! ');');
call execute('format ' !! name !! ' ddmmyy10.;');
if last.memname then call execute('run;');
run;
... View more