I am also using the OLE interface to target PCOMM sessions, but with more than 3 or 4 sessions, some get stuck and scripts end with an OLE exception (saying that session is locked). Thus I was looking on Google to know why, and I found something interesting: starting with version 4.x (don't know exactlty which version), an interface is provided as a DLL (EHLLAPI.dll) for C or Java. I'm currently trying to use it in Perl with Win32::API. If I manage to make it working, I'll put something in code Snippets.
UPDATE: You can find an example in mainframe screen - PCOMM - EHLLAPI