Are there any statements\\functions capable of get the name of variables? Preferrably putting them into a column of another data set, a text field or a macro variable.
PROC CONTENTS would be the quickest way to get that information in a dataset. Column names can be found in the column NAME.
proc contents data=sashelp.class out=contents noprint; run;