C$LOCKPID

This routine returns the Process ID (PID) of the process holding the lock responsible for the previous file lock or record locked condition encountered. This library routine works only with the Vision file system and the UNIX platform.
Note: This ACUCOBOL-GT library routine is available in this COBOL version. Any compatibility issues in this COBOL system are in the Compatibility Issues section at the end of the topic.

Usage

CALL "C$LOCKPID" 
    GIVING PROCESS-ID.

Parameter

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.

Comments

C$LOCKPID returns a PROCESS-ID of 0 if you have not yet encountered a locked file or record, if the PID is otherwise not found, or if you've used this routine with a non-UNIX runtime.

Compatibility Issues

None