data ds1; set sashelp.class; run; data ds2; set sashelp.cars; run; proc sql; select MEMNAME into: numvar separated by " " from dictionary.tables where LIBNAME="WORK" and MEMNAME="DATA" and TYPE="num"; /*'CHAR"*/ quit;
How to get all numeric and character variables from all datasets in a library
proc contents data=WORK._ALL_ out=Variables noprint; run;
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.