Tom, to your point, I may not need a loop. However, I am trying to translate what I can do with VBA, where I create an array of all the files to process then loop through the array to process them all. In the most simple terms, it would be something like this if I have an array called arFiles, with one element containing the file name, as my one dataset in SAS does For i = 1 to ubound(arFiles) step 1 process arFiles(i) Next i Now, in that, the 'process arFiles(i)' would take maybe 8 or 10 lines, but I hope you get the logic. Perhaps this is not necessary in SAS, but my knowledge of how SAS processes is extremely limited, so I am constantly thinking in terms of how VBA would do something, and then I trial and error it until I can muddle a workable result. So, in my dataset I have 65 filepaths to the Excel files I need to import. My reasoning is that I use proc sql to get the first one that has not been processed, use proc import to import it, then move on to the next one until they are all done. If you know of a good reference that would describe a better way to do it in one step I sure would appreciate it. A lot of the posts I read here are just way beyond my comprehension of SAS, so I spend hours researching just the simple things like filevar and pipe. Thank you. Greg
... View more