ttmac,
I don't know about MF Cobol, but RM/Cobol on Unix provides for executing a system command via a CALL "SYSTEM" USING CMD-STRING feature. You can then execute an arbitrary command by building it the CMD-STRING.
If you have a similar feature available, you should be able to run something like:
ps -u $(LOGNAME) > my-processes.txt
You will then be able to turn around and read "my-processes.txt" as a simple sequential text file and search for the process you are looking for. If you put the above command string in a uniquely named script, you should be able to find that script name in the command text portion of the ps output, and use the corresponding parent process id (PPID) to identify your process id.
I've not actually done this. Fortunately, RM/Cobol also provides a callable routine "C$GetSysInfo" that returns, among other things, the specific process id. But I am sure that you should be able to get something like this to work.
"Code what you mean,
and mean what you code!
But by all means post your code!"
Razalas