I was trying to import all files in a directory, and for each file, apply a code that'll change into a new dataset So far, based on the code here: https://github.com/statgeek/SAS-Tutorials/blob/master/Import_all_files_one_type, I understand how make a list of all the file names, then make a separate macro to proc import each of them. Then at the end, write a function to call the separate macro for each entry on the list. What I'm trying to do now is to add to that separate macro my code, but I'm a bit stumped with the "catt('test', put(_n_, z2.)), ');');" part of the last step copied below: %*Call macro once for each entry in the list table created from the %list_files() macro; data _null_; set list; string = catt('%import_file(', dir, ', ', name,', ', catt('test', put(_n_, z2.)), ');'); call execute (string); run;
... View more