Macro variables to the rescue!
Define what you would like folder and filename to be:
%let folder = folder1;
%let filename = filename1;
Then, use these macro variables as the parameters in your macro functions:
%content(&folder. , &filename.); /* resolves to %content(folder1, filename2) */
%sort(&folder. , &filename.); /* etc. */
%average(&folder. , &filename.);
Alternatively, if your folders and filenames always only differ by the number suffix, then you could do:
%let folderNbr = 1;
%let filenameNbr = 1;
%content(folder&folderNbr. , filename&filenameNbr.); /* resolves to %content(folder1, filename2) */
%sort(folder&folderNbr. , filename&filenameNbr.); /* etc. */
%average(folder&folderNbr. , filename&filenameNbr.);
If you don't want to change the folder numbers manually for each run, you could even set up a loop to increment them automatically.
... View more