Bill, Engi and Dave,
Thanks so much. As I said, this was just one example of a case where I needed to do something like this, so it was a learning process. I appreciate everone's input as it all helped to end up with the final result.
Code:
set define off;
spool C:\test.sql;
set...