How to get PID in QUICK /OpenVMS

Chris Sharman chris.sharman@ccagroup.co.uk
Fri, 6 Dec 2002 09:17:21 -0000


> TEMP  PID CHAR*10
> TEMP  JPI$_PID CHAR*8 INIT "JPI$_PID"
> TEMP  PROCESS-ID CHAR*8
> TEMP  PROCESS-NAME CHAR*8
> TEMP  RESULTANT-VALUE INT*4 INIT 0
> 
> PROC INIT
> BEGIN
>  DO EXT LIB$GETJPI(REFERENCE(JPI$_PID),REFERENCE(PROCESS-ID),   &
>     DESCRIPTOR(PROCESS-NAME),REFERENCE(RESULTANT-VALUE),DESCRIPTOR(PID))
> END

Your datatypes are all wrong. See Help rtl_routines lib$ lib$getjpi arg

temp jpi$_pid int*9 init 793 ; from starlet
temp pid char*8
; unused, but if you wanted them, they're these datatypes:
;temp process-id int*9 unsigned
;temp resultant-value int*9 (or int*16)
;temp process-name char*15
;temp resultant-length int*4 unsigned

do ext lib$getjpi(reference(jpi$_pid),,,,descriptor(pid))

Chris


-----------------------------------------------------------------------

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.