Path: utzoo!utgpu!attcan!uunet!munnari!otc!metro!basser!natmlab!dmsadel!augean!sirius!simon From: simon@sirius.ua.oz (Simon Hackett) Newsgroups: comp.os.vms Subject: Re: Server/port/session information for LAT terminals. Message-ID: <93@sirius.ua.oz> Date: 4 Aug 88 00:27:55 GMT References: <8807251321.AA16096@ucbvax.berkeley.edu> Organization: University Computing Services, University of Adelaide Lines: 38 From article <8807251321.AA16096@ucbvax.berkeley.edu>, by MACALLSTR@vax1.physics.oxford.ac.UK: > For anyone wishing to obtain the session/server/port information for any > LAT terminal here is a subroutine ( originally from a DECUS library > tape I believe ) which works with VMS 4.7 and earlier : I don't have > VMS 5.0 to try it out on that yet. You don't need to. VMS V5.0 makes the information easily available; Just use $GETDVI with an item code of TT_ACCPORNAM . Either the system service call direct or F$GETDVI("TERMINAL_ID","TT_ACCPORNAM") The manual entry on this item code (Set P, Volume 4B, Page SYS-215) is: ---------------------- When you specify DVI$_TT_ACCPORNAM, $GETDVI returns the name of the remote access port associated with a channel number, or a physical or virtual terminal device number. If you specify a device which is not a remote terminal, or a remote type that does not support this feature, $GETDVI returns a null string. The $GETDVI service returns the name as server_name/port_name The names are separated by the slash (/) character. If the remote system is an X.29 (VAX PSI) terminal, the name is returned as network.remote_DTE. When writing applications, you should use the string returned by DVI$_ACCPORNAM (sic), instead of the physical device name, to identify remote terminals. ------------------------ {-------------------------------------------------------------------------} { Simon Hackett, Systems Group, University of Adelaide, South Australia } { simon@sirius.ua.oz[.au] } {-------------------------------------------------------------------------}