When you want to run a SAS program you just type this command at the command prompt:
sas myprog.sas
And it will find the file myprog.sas in the current directory and write a files myprog.log and myprog.lst in the current directory.
If you want to have extra control there are dozens (hundreds?) of command line options you can include. You can use -log to tell it where to write the log. You can use -altlog to tell it to write a separate copy of the log somewhere else.
If you have some requirements about where logs are written then just create your own command that adds those options to the command line it uses to invoke SAS. For example you might create a program named runsas so your command line is just:
runsas myprog.sas
And the result is that the following command is run:
sas -altlog /somedir/myuser_date_time.myprog.log myprog.sas
If you do it right the user is free to add any other command line options and they are passed into the call to the actual SAS executable. So you could add -rsasuser option etc to your call to runsas.
Please explain why these option don't work for what you are doing.
... View more