The $ZPID function returns the process identification number (PID) of the first or next currently accessible process in the system. The $ZPID() function is similar to the DCL lexical function F$PID except that M represents the resulting PIDs in decimal.
The format for the $ZPID function is:
$ZPID(tvexpr)
If the truth-valued expression is false (0), $ZPID returns the first accessible, currently active PID in the VMS system; if the truth-valued expression is true (non-zero), $ZPID returns the "next" PID, with respect to the last call to $ZPID; if $ZPID() has a non-zero argument before it has a zero (0) argument, the function generates a run-time error.
If the last prior PID returned is the last PID accessible, $ZPID() returns a null string.
$ZPID() provides a tool for identifying processes in the VMS environment from within GT.M. Accessing information about processes belonging to other users requires certain VMS privileges. Consult your system manager if you feel you require additional privileges.