Hi, Could you explain exactly what you are doing as I really don't see what the problem is here. As Reeza mentioned create macro logic to parse if one or more files. The way I would do it though is this: /* Do your prompt or what ever it is here */ /* Put the resulting string or strings into a dataset */ /* Parse the dataset if necessary to get one row per file */ data _null_; set list_of_files; call execute('ods tagsets.excelxp file="...\'||strip(filename)||'.xls"; /* Do you code here */ ods tagsets.excelxp close;'); run; As for your macro code above, you would need to inform us where the error occurs, what you are running it in, maybe log with mlogic mprint symblogen on. Do you have this code within a %macro / %mend construct?
... View more