The only approach I can think of here would be to rewrite your code so that it runs each by group separately from the rest, in one or more SAS/CONNECT sessions, have the parent session kill each one after a set timeout, and then recombine the surviving output.
As Dom and Joe have pointed out, this is not a trivial task, but it's possible if you're sufficiently keen on learning about that aspect of SAS. A good place to get started for this sort of thing would be this page:
http://support.sas.com/rnd/scalability/tricks/connect.html
I was able to use the examples there and elsewhere as the basis of a simple parallel processing framework (in SAS 9.1.3, coincidentally!), but there are many details you will need to consider. To give you an idea of the sorts of adventures in store if you go down this route:
- Learning how to sign on to your server via SAS/CONNECT within whatever infrastructure you're using (will the usual autoexec file work? What invocation options do you need to use?)
- Explaining to your sysadmin/colleagues why you need to run multiple processes in parallel
- Managing asynchronous sessions
- Syncing macro variables, macro definitions, libraries and formats between sessions
- Obscure bugs (I wasn't able to use the usual option for syncing libraries and had to roll my own via
call execute
...)
One could write a (lengthy) SUGI paper on this topic, and I'm sure there are plenty of them out there if you look around.