Operating System - OpenVMS
1753899 Members
7558 Online
108809 Solutions
New Discussion юеВ

Re: How to identify a process running in group table.

 
SOLVED
Go to solution
Joseph Huber_1
Honored Contributor

Re: How to identify a process running in group table.

So the systems are standalone, not members of a VMS-cluster. This means the program gathering the logical names must run on each of the nodes participating, and gathered together as I have written previously.

Node names:
A procedure executing ON the node gets it via f$getsyi("NODENAME") (or the underlying sys$getsyi() RTL call).
Somehow Your application must have a list of the nodes in question, even if they have no name (DNS entry), it can be a list of IP addresses, but why can't You give them names in a local hosts file ? And at best give them names identical to the VMS node names.
http://www.mpp.mpg.de/~huber
Jon Pinkley
Honored Contributor

Re: How to identify a process running in group table.

RE:"The solution am looking for is to check all the logicals created in GROUP table not in creating a logicals."

The Group table on the "central" node, or the group tables on all the up to 8 systems that are connecting to the central computer.

Why can't you answer what you are trying to accomplish? Why does program C need to identify whether any logical STATION_XXXX_CMD is assign with value "XX"

Answering the question you are asking probably won't solve the real problem.

Jon
it depends
Jan van den Ende
Honored Contributor

Re: How to identify a process running in group table.

Ragav,

so, no cluster - forget about that table.

>>>
There are as many group tables as there are groups from which users have logged in since boot time. And potentially that can become a LARGE number (octal 37776, or decimal 16382)
Do you KNOW in WHICH group table to look for the logical?
Like Jon asked, tell us "what problem are you trying to solve", NOT what do you think may be the solution, but can not get implemented.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Jan van den Ende
Honored Contributor

Re: How to identify a process running in group table.


>>>
The solution am looking for is to check all the logicals created in GROUP table not in creating a logicals.
<<<

The idea is to add a "helper" logical which in one pass can tell you the info you are trying to find.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Joseph Huber_1
Honored Contributor

Re: How to identify a process running in group table.

With a variation of my procedure posted earlier, does it what You want ?

MPIW10_HUB>cat showstation.com
$ node=f$edit(f$getsyi("NODENAME"),"TRIM")
$ loop:
$ device=F$DEVICE("_''node'$*","TERM")
$ if device.eqs."" then exit
$ unit=device - f$getdvi(device,"HOST_NAME") - "_" -"$" - ":"
$ lnam = "STATION_"+unit+"_CMD"
$ value=f$trnlnm(lnam,"LNM$GROUP")
$ if value.nes."" then -
$ write sys$output node,":",lnam,":",value
$ goto loop

MPIW10_HUB>cat showstation_all.com
$ rsh mpiw10 @[.scratch]showstation
$ rsh mpiw12 @[.scratch]showstation

MPIW10_HUB>@showstation_all
MPIW10:STATION_FTA74_CMD:SERVER
MPIW12:STATION_FTA1_CMD:XX

where MPIW10,MPIW12 are the nodes where the logicals are defined,
and the assumption my userids are in the desired UIC group on all of the nodes.
(otherwise add the target UIC group as a parameter to the showstation command procedure, and replace table=LNM$GROUP by table=LNM$GROUP_'p1' ).
http://www.mpp.mpg.de/~huber
Ragavendran_1
Occasional Advisor

Re: How to identify a process running in group table.

Joseph,

Thanks for your valuable reply, i have followed your logic and got my solution.

In my system we have logical to identify the no. of terminals and the terminal names.

Terminal_cnt 8
terminal1 TXA1
terminal2 TXA2
.
.
terminal8 TXA8

so using this i got the device name like

$ NUM = 1
$ CHK_PROC:
$ TERM_CNT = F$TRNLNM( "TERMINAL_COUNT")
$ IF (TERM_CNT .LE 0) THEN GOTO END
$ DEV = F$TRNLNM( "TERMINAL''NUM'")
$ IF(DEV .EQS. "")THEN GOTO PROC_END
$ IF( .NOT. F$GETDVI(DEV,"EXISTS"))THEN GOTO PROC_END
$ DEV = F$GETDVI( DEV,"TT_PHYDEVNAM")
$ IF( DEV .EQS. "")THEN GOTO PROC_END
$ STA = "STATION"+(DEV - ":")+"_CMD"
$ CMD = F$TRNLNM( "''STA'",GRP_TBL)
$ IF (CMD .EQS "XX") THEN
$ -- DO MY JOB --
$ ENDIF
$ PROC_END:
$ NUM = NUM + 1
$ IF (NUM .LE. TERM_CNT) THEN GOTO CHK_PROC
$ END:
$ EXIT

WOO HOO.. I am bit new to Open VMS and DCL.
I never thought any forum available for this technology.. Great!! You Guys really doing great job.. Keep sending your valuable responses.

Regards,
Ragav.