Of course endsas will not end sas. It did that in the old day-s when it was build for card input in a single process.
Go to you EG (5.1 and up) and check the physical name of the work. You will see the naming of the work being repeated.
That is very weird as normally not being expected for a single process. ..... It is not a single process there are more then one.
Go the your options of your EG project. You will find a parallel code submission option.... That is one of the goodies for programming improvement in some papers (gtfw).
What is happening?
- You will get a master session that wil offer you the libnames and all interactive server access in the menu's
- You can some or more child processes that run the code for you. In non-parallel mode all data/setting will be given back to the master process. That one is also locked during the processing. In paralle mode every proces will run as an dedicated process but being part as a subdir of the master proces.
This behavior is similar to other processes that do some loadbalancing and pooling.
Now you have your explanation why endsas is not working for saswork cleanup you can solve it also easily.
Make a sas program that runs parallel and will kill all (x-cmd usage) sas sessions of the user. that will cleanup all running process, restart the master process. As it allows normal clean up (do not use the asocial -9! ) the saswork files should be cleaned up.
When something is left as a ghost process or other dat left behind, those shoudl be cleaned in a regular process.
---->-- ja karman --<-----