Maybe this article can help to understand the differences between process (or application) virtual machine, system virtual machine and host virtual machine.
Probably in your local machine the cobol process runs in the same process/host virtual machine than the form while in your system virtual machine is running in distinct process/host virtual machines just because the virtualization. This can be the reason to fail to set the parnet handle.
There are various cobol languange builders/versions but most of them are using a proces virtual machine to interact whith the OS.
Hope this helps.