Nick wrote:
"Why would this make a .do file easier to use and maintain?"
Because it would obviate the need to manually edit a do file to rename
the log file (and similar tasks, as shown in the example in my OP). In
terms of workflow, manual editing is inefficient and, more importantly,
it is an opportunity for errors (e.g., data-entry mistakes) to enter
into the process.
This functionality would not be useful in every situation, but it would
have been a handy tool for some situations. When a SAS code file is run
in batch mode, the default name of the log file it creates is <name of
the SAS code file>.log. That's something I miss about SAS (probably the
only thing I miss about SAS).
Thanks, Daniel, for pointing me to that post! I didn't find it in my
searching.
The post suggests passing the filename as an additional parameter each
time the do file is called, but I don't think that work-around would
make my workflow easier or less prone to mistakes. Oh well, at least I
know I'm not the only one who has wished for this functionality.