In reply to Miguel Alberruche.

As far as the second question, it's possible that LIST PERFORMANCE doesn't apply to SAS Workspace sessions. I think that works with SAS Stored Process servers and perhaps other multiuser servers.

The first question: I think the STOP command is basically executing an OS-level "kill" which won't allow the SAS sessions to clean up neatly. I don't know of a way to force an existing session to run a set of "clean up" code as you have built in to your process.