The VARNUM option will list variable names in creation order. For example:

libname ecprg193 '/home/marija/ecprg193';
proc contents data=ecprg193.orders varnum;
run;

OUTPUT: varnum.png

For more information, see: (https://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#n1bai32d7gp3yen1dq2fvfbizx0s.htm)