Years ago I did a SUGI paper using the dictionary tables. I learned that using DICTIONARY.COLUMNS in PROC SQL is faster than using a DATA step with SASHELP.VCOLUMN. You could speed up your code by replacing your DATA step with PROC SQL. Also the values of LIBNAME and NAME in the dictionary/sashelp tables are already in uppercase. Using the upcase function there is unneeded. The open function is a nice bit. Paper is at ftp://ftp.sas.com/techsup/download/misc/flatfile.pdf if anyone is interested.