Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Lexical function node of a running process

 
Highlighted
Regular Advisor

Lexical function node of a running process

Hi,

In a VMS cluster you can use the lexical functions below to find out if a process is running some where in a VMS Cluster.
The lexical function f$pid gives back the process id.
Is there also a lexical function that gives back the actual node name on which the process is running.

$ PROC_NAME = "PRC_TOINE"
$ ctx = ""
$ tmp = F$CONTEXT("PROCESS", ctx, "NODENAME", "*","EQL")
$ tmp = f$context("PROCESS",ctx,"PRCNAM","''PROC_NAME'","EQL")
$ pid = f$pid(ctx)

Thanks,

/Toine
4 REPLIES 4
Highlighted
Regular Advisor

Re: Lexical function node of a running process

Hello,

I found it in the help.

f$getjpi(pid,"NODENAME")

Highlighted
Regular Advisor

Re: Lexical function node of a running process

Closed
Highlighted
Honored Contributor

Re: Lexical function node of a running process

use f$getjpi(pid,"NODENAME")
Phil
Highlighted
Honored Contributor

Re: Lexical function node of a running process

Well, other than the fact that this approach won't work in other than carefully architected same UIC group environments, and other than that the process name isn't reliable and duplicates have arisen, sure, have at...