I accepted an answer a bit too hastily when I tried to ask a question earlier. I wasn't clear enough with my question then. And didn't understand the answers given. So, need to try one more time....
@SASKiwi , @PaigeMiller , @Kurt_Bremser , and helpful community.
I've set up a complete document/program:
"Logistic, All.txt"
At the top of the document is:
%let etf = xyz ;
Then all throughout the document is the following, as appropriate, everywhere "xyz" needs to appear:
&etf.
SAS calls this trick creating and using a macro variable. Pretty straight forward, easy enough, and incredibly useful.
Running the entire long program set in SAS works perfectly. All is good with the entire amalgam of procedure steps. Completion is as desired.
What's next is to act on a whole list, as "xyz" is only ONE of a hundred such.
The complete list, say, is:
xyz
abc
def
lmn
qrs
(etc.)
So, as of this second, to move forward, I would need to replicate the above-mentioned document 100x, manually changing only the "xyz" at the very top of each document, to the appropriate characters, and then running each of the 100 documents through SAS. This can fairly efficiently be done in a single go (not 100 separate runs) -- using the %include approach, in an additionally created document:
"Logistic, All, Complete List, Using 'Include'.txt":
%include "c:\1\Logistic, All -- xyz.txt" ; %include "c:\1\Logistic, All -- abc.txt" ; %include "c:\1\Logistic, All -- def.txt" ; %include "c:\1\Logistic, All -- lmn.txt" ; %include "c:\1\Logistic, All -- qrs.txt" ; (etc.)
Instead of going about it in the above manner, I'm pretty sure there is a macro approach. Automatically get each of the list items over into the "xyz" position (at the very top), one at a time, through the entire list, running the entire procedure set at each iteration of each change.
I hope the task is clear enough this time around, and look forward to your responses. Please try to answer as clear as day, as this all seems rather cloudy at present. And hopefully others will see this post and learn something as well. There may be more than one way of accomplishing the task. Please share your thoughts.
Humorously, I don't even know what to call the above challenge, so as to conduct a successful Google search.
Thanks!
Nicholas Kormanik
... View more