Fortunately you are not the first one with such a problem, so you will find working code in the web.
If all files have the same structure, you don't need macro code, but wildcards in the infile statement. If you need to identify the files currently being processed, the infile-statemtn has an option for this.
... View more