Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!pasteur!ucbvax!UBVMSC.CC.BUFFALO.EDU!ACSCCRA From: ACSCCRA@UBVMSC.CC.BUFFALO.EDU ("Curtis R. Anderson") Newsgroups: comp.os.vms Subject: RE: Querry on interactive /batch users . Message-ID: <8805241903.AA14925@ucbvax.Berkeley.EDU> Date: 23 May 88 14:48:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 20 >EASY QUESTION: > > Does any one know of a fucntion, system service, or anything that may be >called from a high level langauge (Pascal, C) that would do the same as >VMS's $ SHOW USERS ? > I would like to check if a user is signed on (interactive or batch) >without doing LIB$SPAWN('$ SHOW USERS auser') > Is there a simpler way?? Sure. Use LIB$GETJPI, passing JPI$_USERNAME as the first parameter, and -1 for the initial PID. Make sure the PID is in a variable so the call can change it. Insure you have a descriptor ready to receive at least 12 characters. Don't forget turning on WORLD privilege. See the entry for LIB$GETJPI in the Run-time Library Routines reference for exact order of parameters. I think you need three or four parameters. --Curtis Batteries not included.