How to get PID in QUICK /OpenVMS
Kevin Wong
kevinw@hkpetro.com.hk
Wed, 18 Dec 2002 10:59:45 +0800
Dear Chris,
$Def/Job/Exec ..." solve the problem in qdesign, but SYSNAM privilege really
make me think twice about putting it to all normal user.
> That's correct, because the 'go' command starts a subprocess, which won't
> have the logical correctly defined. To have it work for normal users, I'd
> suggest a system-wide logical, defined at startup.
> You can use a qkgo file to use a name other than qkdriver (eg
> qkdriver_librtl, or even just librtl).
> "$ def/job/exec" might make the 'go' command work - not sure - but you
> wouldn't normally use 'go', or SYSNAM privilege, would you ?
>
> Chris
>
> > > Peter Bateman is correct: you need to ensure that lib$getjpi is
> > defined as
> > a
> > > universal symbol in QKDRIVER.
> > > You could use librtl as your qkdriver, if you only need lib$
> > routines, or
> > if
> > > you've got other routines, you may have to write your own 'jacket'
> > routine,
> > > probably with a different name to avoid naming clashes.
> > >
> > > The code below works, provided you have SYSNAM privilege
> > (unlikely unless
> > > you have close to system management authority).
> > >
> > > $ qdesign
> > > screen mypid menu
> > > temp jpi$_pid int*9 init 793 reset at startup
> > > temp z int*9 reset at startup
> > > temp mypid char*14 reset at startup
> > > field mypid display predisplay
> > > procedure initialize
> > > do external
> > >
> > lib$getjpi(reference(jpi$_pid),value(z),value(z),value(z),descript
> > or(mypid))
> > > build
> > > exit
> > > $ set proc/priv=sysnam
> > > $ def/exec qkdriver sys$share:librtl ! requires SYSNAM priv
> > > $ quick auto=mypid.qkc
> > >
> > > Chris
> > >
> > > > -----Original Message-----
> > > > From: Kevin Wong [mailto:kevinw@hkpetro.com.hk]
> > > > Sent: 12 December 2002 02:27
> > > > To: powerh-l@lists.swau.edu
> > > > Subject: Re: How to get PID in QUICK /OpenVMS
> > > >
> > > >
> > > > > > Do ext lib$getjpi(reference(jpi$_pid), &
> > > > > > VALUE(IZERO), &
> > > > > > descriptor(process-name), &
> > > > > > VALUE(IZERO), &
> > > > > > descriptor(pid))
> > > > >
> > > > > process-name is input to lib$getjpi, not output - you don't
mention
> > > > > initialising it to the process you're looking for. If you're
> > > > wanting info
> > > > on
> > > > > your own process then this too should be specified as
value(izero).
> > > > > You should also be aware that only processes in your UIC
> > group can be
> > > > found
> > > > > by process name.
> > > > >
> > > > Dear Chris,
> > > > I've already tried putting value(izero) to all unwanted arguments,
the
> > > > screen compile OK but the PID fail to show up with run time error -
> > > > %LIB-F-KEYNOTFOU, key not found in tree LIB$GETJPI
> > > >
> > > > do ext lib$getjpi(reference(jpi$_pid), &
> > > >
> > > > VALUE(IZERO), &
> > > >
> > > > VALUE(IZERO), &
> > > >
> > > > VALUE(IZERO), &
> > > >
> > > > descriptor(pid), &
> > > >
> > > > value(izero) )
> > > >
> > > >
> > > > = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> > > > Mailing list: powerh-l@lists.swau.edu
> > > > Subscribe: "subscribe" in message body to
> > powerh-l-request@lists.swau.edu
> > > > Unsubscribe: "unsubscribe" in message body to
> > > > powerh-l-request@lists.swau.edu
> > > > http://lists.swau.edu/mailman/listinfo/powerh-l
> > > > This list is closed, thus to post to the list you must be a
> > subscriber.
> > > > ------------------------------------------------------------------
> > > > --------------
> > > > Date: Thu, 12 Dec 2002 10:23:21 +0800
> > > >
> > >
> > >
> > >
> >
> -----------------------------------------------------------------------
> > >
> > > Any views expressed in this message are those of the sender and not
> > > necessarily those of CCA Group. The unauthorized use, disclosure,
> > > copying or alteration of this message is forbidden. The contents of
> > > this message may be confidential and/or privileged, copyright CCA
Group
> > > and are intended solely for the use of the individual or entity to
whom
> > > they are addressed. Whilst this message has been scanned, CCA Group
> > > cannot guarantee that it is virus free or compatible with your systems
> > > and accepts no responsibility for any loss or damage arising from its
> > > use. The recipient is advised to run their own anti-virus software. If
> > > you receive this message in error please contact
> > > postmaster@ccagroup.co.uk immediately, destroy any copies and delete
it
> > > from your computer systems.
> > > = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> > > Mailing list: powerh-l@lists.swau.edu
> > > Subscribe: "subscribe" in message body to
> > powerh-l-request@lists.swau.edu
> > > Unsubscribe: "unsubscribe" in message body to
> > powerh-l-request@lists.swau.edu
> > > http://lists.swau.edu/mailman/listinfo/powerh-l
> > > This list is closed, thus to post to the list you must be a
subscriber.
> > >
> >
> > = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> > Mailing list: powerh-l@lists.swau.edu
> > Subscribe: "subscribe" in message body to
powerh-l-request@lists.swau.edu
> > Unsubscribe: "unsubscribe" in message body to
> > powerh-l-request@lists.swau.edu
> > http://lists.swau.edu/mailman/listinfo/powerh-l
> > This list is closed, thus to post to the list you must be a subscriber.
> > ------------------------------------------------------------------
> > --------------
> > Date: Tue, 17 Dec 2002 14:34:22 +0800
> >
>
>
>
> -----------------------------------------------------------------------
>
> Any views expressed in this message are those of the sender and not
> necessarily those of CCA Group. The unauthorized use, disclosure,
> copying or alteration of this message is forbidden. The contents of
> this message may be confidential and/or privileged, copyright CCA Group
> and are intended solely for the use of the individual or entity to whom
> they are addressed. Whilst this message has been scanned, CCA Group
> cannot guarantee that it is virus free or compatible with your systems
> and accepts no responsibility for any loss or damage arising from its
> use. The recipient is advised to run their own anti-virus software. If
> you receive this message in error please contact
> postmaster@ccagroup.co.uk immediately, destroy any copies and delete it
> from your computer systems.
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
>