How to get PID in QUICK /OpenVMS
Peter Bateman
shediac92@hotmail.com
Wed, 11 Dec 2002 14:24:47 -0400
Kevin:
It looks like QUICK could not find your external.
try matching the case of external name by putting the name in quotes.
i.e.DO EXTERNAL "LIB$GETJPI" or DO EXTERNAL "lib$getjpi"
depending on the case in the library.
You may have to go through the BUILDEXTERNAL process. Check your
QUICK manual on this. You certainly would have to if this was your
own routine that you are calling.
Regards,
Peter
>From: "Kevin Wong" <kevinw@hkpetro.com.hk>
>To: <powerh-l@lists.swau.edu>
>Subject: Re: How to get PID in QUICK /OpenVMS
>Date: Wed, 11 Dec 2002 14:35:59 +0800
>
>Dear Peter,
>
>When I put value 0 to unwanted argument, I get the following run time error
>msg.
>%LIB-F-KEYNOTFOU, key not found in tree LIB$GETJPI
>
>Thanks
>
>Kevin Wong
>
>;---------------- testing code -------------------
>
>temp jpi$_pid int*9 init 793 ; from starlet
>
>temp pid char*8
>
>temp process-id int*9 unsigned INIT 0
>
>temp resultant-value int*9 INIT 0 ; (or int*16)
>
>temp process-name char*15
>
>temp resultant-length int*4 unsigned INIT 0
>
>temp IZERO int*4 init 0
>
>.....
>
>Do ext lib$getjpi(reference(jpi$_pid), &
>
> VALUE(IZERO), &
>
> descriptor(process-name), &
>
> VALUE(IZERO), &
>
> descriptor(pid))
>
>----- Original Message -----
>From: "Peter Bateman" <shediac92@hotmail.com>
>To: <kevinw@hkpetro.com.hk>; <powerh-l@lists.swau.edu>
>Sent: Wednesday, December 11, 2002 11:37 AM
>Subject: Re: How to get PID in QUICK /OpenVMS
>
>
> > Dear Kevin:
> >
> > HP has a discussion on calling lib$getjpi
> > at http://www.openvms.compaq.com/wizard/wiz_5561.html.
> > One thing they mention:-
> > "When the process name and resultant string arguments are not required,
> > specify them as zero -- and not as the address of a zero-length constant
> > string."
> >
> > To do that in Quick:-
> >
> > Temporary IZERO integer size 4 initial 0
> >
> > Do external lib$getjpi( JPI$_PID,
> > InputPid,
> > value(IZERO),
> > OutputPid,
> > value(IZERO),
> > RetLen )
> > I believe the default is by reference.
> > I hope this helps.
> > Regards,
> > Peter Bateman
> >
> >
> >
> >
> >
> >
> > >From: "Kevin Wong" <kevinw@hkpetro.com.hk>
> > >To: <powerh-l@lists.swau.edu>
> > >Subject: Re: How to get PID in QUICK /OpenVMS
> > >Date: Tue, 10 Dec 2002 10:02:21 +0800
> > >
> > >Dear Chris,
> > >
> > >You're right, I want to update the process name to reflect the program
> > >name,
> > >the lib$getjpi function is to get a unique name.
> > >
> > >Thanks to all others that suggest run DCL before the quick screen, I
> > >already
> > >use that method with the first screen, but it's just not possible to
>run
> > >every subscreen by using a DCL command because lots of parameter needs
>to
> > >be
> > >pass btw diff screen.
> > >
> > >Thanks again
> > >Kevin Wong
> > >
> > >----- Original Message -----
> > >From: "Chris Sharman" <chris.sharman@ccagroup.co.uk>
> > >To: <powerh-l@lists.swau.edu>
> > >Sent: Friday, December 06, 2002 5:06 PM
> > >Subject: RE: How to get PID in QUICK /OpenVMS
> > >
> > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Edis, Bob [mailto:bedis@usbnc.org]
> > > > > I would use a RUN COMMAND to create a JOB logical that contains
> > > > > the PID and then read that logical in Quick syntax.
> > > > >
> > > > > RUN COMMAND "<DCL syntax to SET logical JPI$_PID to PID using
> > > > > F$GETJPI("", "pid") command>"
> > > >
> > > > If you want to do it this way, it would have to be
>f$getjpi("","owner")
> > >to
> > > > take account of the fact that you've spawned a subprocess.
> > > > I'd be inclined to use do external, as another poster suggested, or
>'pid
> > >=
> > > > f$getjpi("","pid")' before invoking quick.
> > > > But why do you want it ?
> > > > It's only really useful in external procedures, or run commands, or
> > >possibly
> > > > to generate a unique string.
> > > >
> > > > 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.
> > > >
> > > > = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> > > > 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.
> >
> >
> > _________________________________________________________________
> > Protect your PC - get McAfee.com VirusScan Online
> > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> >
> > = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> > 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.
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail