This routine returns the Process ID (PID) of the current process. This PID can be compared with the PID returned by the C$LOCKPID to determine if the current process is the one holding a file lock or record locked condition.
CALL "C$GETPID" GIVING PROCESS-ID.
|PROCESS-ID PIC 9(n)||This contains a numeric data item large enough to hold a PID. On most platforms, PIC 9(5) is sufficient. On 64-bit systems, PIC 9(7) is recommended.|
When called from a non-UNIX or non-Windows runtime, C$GETPID returns a PROCESS-ID of "0". This behavior should not be used for system identification. Use ACCEPT ... FROM SYSTEM-INFO instead.