04-16-2014 04:36 AM
Well, its not straightforward. What you need to do is to write open file windows to a file on shutdown, so maybe have a final.sas which runs on close down. Then in your autoexec.sas (the file which runs at SAS startup) you could have commands:
DM 'include pathtofile\youfile.sas';
Do this for each file in the text file you saved earlier. That would open each of the windows. I don't know of an option to do this automatically.
04-17-2014 04:04 AM
Just write a list of what you have open to a text - just the filenames, so that you can read that back in and use it to re-open files. As SAS doesn't record the files that were open, you need to do that manually, then read that file in and use the filenames there to open those files. I know what you mean though, in SharpDevlop/Eclipse etc. then you can set it to re-open the last project. SAS doesn't have this function (at least base, haven't really used the other technologies - EG, DI etc).
05-07-2014 05:41 AM
Yes, that is indeed what I would like to do.
I know there is a way to write the name of the running program to the log or an external file through the %sysget(SAS_EXECFILENAME) command so it may be possible to write a macro that writes the name of at least one of the open files into a textfile.
So that could work as long as you don´t have several files that you want to be opened automatically on startup.
Thanks for your help!
04-17-2014 07:52 AM
On every type of object there is a "open recent".
When you use sas/base dms there is "wave all" command and a registry entry. That is a SAS registry not the Windows registry.
The behavior looks more like a complete Desktop environment and is as total not well to get to a complete last state setting.
In a multi-user environment that would be not logical (impossible). You can never know what others in the time between could have changed.