Let's say I have a file A1.txt and a file A2.txt. I have written the statements
filename in1 'A1.txt';
filename in2 'A2.txt';
Now, I want to re-do this using B1 and B2 (and eventually C1, C2, D1, D2), and just rename the variable in one place. So, I want a statement like
%let prefix = 'B';
and then I want to put that prefix in the filename statements.
filename in1 '&prefix1.txt';
filename in2 '&prefix2.txt';
I'm not doing this in a data statement. I can almost get it. filename in1 &prefix'.txt' tries to read B'.txt but that extra quote is pesky. There's something vague in my memory banks about using an _ but I can't pull it out.
Thanks.