Nice. You can turn off that error by using DKRICOND=nowarn. This means another possible approach is to use PROC contents, e.g.:

options dkricond=nowarn ;
proc contents data=AllNum(keep=_character_) out=MyVarList(keep=name);
run ;

That will create work.MyVarList, with one record per variable that survived the KEEP. In this case, you get a 0 record dataset. On SAS severs with lots and lots of libraries defined by default, sometimes the dictionary tables get slow to process, and PROC CONTENTS can be faster.