Operating System - OpenVMS
1753777 Members
7620 Online
108799 Solutions
New Discussion юеВ

Open VMS Run detached process query

 
SOLVED
Go to solution
Srikanth Arunachalam
Trusted Contributor

Open VMS Run detached process query

Hi,

I need to runa detached job like
RUN/PROC = cpsmon_sysx -
/uic = [OMS_MASTER] -
/INPUT= tc_log:cpsmon.com -
/enqu=2000 -
/priv=(all,nobypass) -
/io_b=1000 -
/io_d=200 -
/extent = 20000 -
/maxi = 100000 -
/work = 50000 -
/buff = 80000 -
/file = 150 -
/page = 180000 -
/queu = 50 -
/subp = 6 -
/ast_l = 500 -
sys$system:loginout

My command file cpsmon have few parameters in it..please let me know how to submit cpsmon with parameter p1 and p2 as a detached job
3 REPLIES 3
Steven Schweda
Honored Contributor

Re: Open VMS Run detached process query

I don't do this, but my guess would be that
you need to create a new "temp.com" which
does something like:

$ @ tc_log:cpsmon.com 'p1' 'p2'

This seems to be what is done, for example,
in SYS$MANAGER:DECW$STARTSERVER.COM. (Look
for "decw$killserver".)
Jan van den Ende
Honored Contributor

Re: Open VMS Run detached process query

Steven gave a good solution.

Another way to achieve this is by way of Logical Names.

Define the values of your params (and I favor using meaningful names) in a table that is accessible by the detached process.
I much prefer creating a dedicated LogicalNameTable (if so desired, those can be clusterwide, in which case they survive node reboot!), but you might also decide to use the LNM$GROUP_

Now in cpsmon.com, for each "param", do a F$TRNLNM

We have found this a very effective and very flexible way to handle those kind of things, but as always,
YMMV.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
John Gillings
Honored Contributor
Solution

Re: Open VMS Run detached process query

Srikanth,

If you're on a late enough version of OpenVMS (8.2 or higher) you can CREATE/MAILBOX then specify that as your /INPUT. The creator process can then write the appropriate "@" command with whatever parameters you like.

$ CREATE/MAILBOX DETMAIL
$ OPEN/WRITE DETCMD DETMAIL
$ RUN/DETACHED/INPUT='F$TRNLNM("DETMAIL") ...
$ WRITE DETCMD "@tc_log:cpsmon.com ""''par1'"" ""''par2'"""
$ CLOSE DETCMD
$ DELETE/MAILBOX DETMAIL

Note that since the detached process will probably still have a channel open to the mailbox, it won't actually get deleted until the process terminates.

Make sure you get the latest patches and check that your mailboxes get deleted properly, I think some of the early implementations had trouble cleaning up.
A crucible of informative mistakes