[mod.computers.vax] f$getjpi

mhg@MITRE-BEDFORD.ARPA.UUCP (07/31/86)

I am running VMS v4.2 on a VAX cluster (a 785 and a 780).  Why, when I
type
	$ WRITE SYS$OUTPUT F$GETJPI("","OWNER")

do I get nothing??  I can type WRITE SYS$OUTPUT F$GETJPI("","USERNAME")
to get my username, and I can get every other piece of AUHTORIZE
information EXCEPT Owner.

Anyone got any suggestions/solutions/etc ??

Thanks in advance.

Mark H. Granoff
ARPA: mhg@mitre-bedford
DDD:  (617) 271-8438

HELLER%cs.umass.edu@CSNET-RELAY.ARPA.UUCP (08/01/86)

F$GETJPI("","OWNER") returns the owner processes's PID, the the UAF Owner
field!

That means that for your root processes, F$GETJPI("","OWNER") returns blank.

Try this:

$ spawn write sys$output f$getjpi("","OWNER")

This is an *expensive* way to do

$ write sys$output f$getjpi("","PID")

I don't think that f$getjpi (or sys$getjpi) can get you the Owner field of
the SYSUAF file.  You have to get that info directly from the SYSUAF file
yourself.  This probably means an installed (with privs) program.  I don't
think this field is used by VMS for anything except for purely informative
purposes.  That is, it is there in the UAF for system manager types to look
at to help them map between usernames and real people.  Also, it is
available for used by accounting programs to include on the billheads and
for use by "whois" and "finger" type programs to help users map between
usernames and real people (we have a "whois" program here at UMass - it
searches the UAF using a varity of search "keys" and formats a brief to
verbose output of parts of UAF records).  The old version of the PMDF
software used the owner field as a default string to stuff in the From:
field before the "cryptic" arpanet/csnet address (in "<", ">"'s).  I don't
believe that LOGINOUT bothers to copy this UAF field from SYSUAF.DAT to the
process's database (JIB, PCB, whatever).

				Robert Heller
				CSNET: Heller@UMass-CS.CSNET
				BITNET: Heller@UMass.BITNET
				BIX: heller

8250480@UWAV4.BITNET (08/02/86)

> Date: Wed, 30 Jul 86 15:50:06 -0500
> From: Mark H. Granoff <mhg@mitre-bedford.ARPA>
>
> I am running VMS v4.2 on a VAX cluster (a 785 and a 780).  Why, when I
> type
>     $ WRITE SYS$OUTPUT F$GETJPI("","OWNER")
>
> do I get nothing??  I can type WRITE SYS$OUTPUT F$GETJPI("","USERNAME")
> to get my username, and I can get every other piece of AUHTORIZE
> information EXCEPT Owner.

The process OWNER attribute is not really a AUTHORIZE piece of information;
instead, for a sub-process it returns the PID of the process that created
it, for a "top-level" process it returns the null string (no owner).

Try:   $ WRITE SYS$OUTPUT F$GETJPI("","PID")    ! display current process
then,  $ SPAWN                                  ! create a sub-process
then,  $ WRITE SYS$OUTPUT F$GETJPI("","OWNER")  ! display PID of owner
then,  $ LOGOUT                                 ! return to master process

Both WRITE statements will display the same PID.

-- Erik A. Abers                        -- 501 N. 36th. St. #167
-- University of Washington             -- Seattle, WA 98103; USA

Bitnet:  8250480@UWAV4.BITNET
Arpanet: 8250480%UWAV4.BITNET@WISCVM.ARPA
Usenet:  8250480%UWAV4.BITNET@WISCVM.WISC.EDU

CHAA006%UK.AC.RHBNC.VAXA@AC.UK (08/02/86)

>>> I am running VMS v4.2 on a VAX cluster (a 785 and a 780).  Why, when I
>>> type

>>> 	$ WRITE SYS$OUTPUT F$GETJPI("","OWNER")

>>> do I get nothing??  I can type WRITE SYS$OUTPUT F$GETJPI("","USERNAME")
>>> to get my username, and I can get every other piece of AUHTORIZE
>>> information EXCEPT Owner.

Unless you're running in the context of a sub-process, you won't HAVE an
owner --- that's the definition of a detached process!  ** Phil.

Philip Taylor (RHBNC; Univ. of London) <CHAA006@UK.AC.RHBNC.VAXB>

Bitnet: CHAA006%RHBNC.VAXB@AC.UK
  or  : CHAA006@VAXB.RHBNC.AC.UK
Arpa  : CHAA006%UK.AC.RHBNC.VAXB@ARPA.UCL-CS

haug%vax.runit.unit.uninett@NTA-VAX.ARPA (Steinar Haug) (03/19/87)

I have been fiddling around with the lexical function f$getjpi
lately, and have found some strange parameters in the help
information which don't seem to work. They are:

ASTPEN, BATCH, DELPEN, DISAWS, FORCPEN, HIBER, INQUAN, LOGIN,
PHDRES, PSWAPM, PWRAST, RES, RESPEN, SSFEXC, SSFEXCS, SSFEXCU,
SSFEXE, SSRWAIT, SUSPEN, SWPVBN, WAKEPEN, WALL

(all returned by $ help lex f$getjpi item)

Many of the names are quite suggestive, ie. ASTPEN probably means
"AST pending", but they are not documented under $getjpi in the
System Service Description. (We are running VMS 4.4 but the manual
says 4.0.) Using them gives the following error:

Unrecognized keyword - check validity and spelling
 \ASTPEN\

Can anyone enlighten me as to what these parameteres are supposed
to mean, and under what circumstances they are supposed to work?

Steinar Haug
Computing Center at the University of Trondheim
7034 Trondheim,
Norway

e-mail: haug%vax.runit.unit.uninett@nta-vax.arpa