home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.vms
- Path: sparky!uunet!gatech!destroyer!cs.ubc.ca!mprgate.mpr.ca!vli
- From: vli@mpr.ca (Vincent Li)
- Subject: Re: Set Host command file
- Message-ID: <1993Jan21.233900.1018@mprgate.mpr.ca>
- Sender: news@mprgate.mpr.ca
- Organization: MPR Teltech Ltd., Burnaby, B.C., Canada
- References: <01GTLB3KG9ZU8WW0YW@kopc.hhs.dk> <17JAN199319441116@nereid.sunquest.com>
- Date: Thu, 21 Jan 93 23:39:00 GMT
- Lines: 48
-
- In article <17JAN199319441116@nereid.sunquest.com> spg@nereid.sunquest.com (Steve Gibbons) writes:
- >In article <01GTLB3KG9ZU8WW0YW@kopc.hhs.dk>, ARNE@KOPC.HHS.DK (Arne Vajhxj) writes...
- >#> 1 get my USERNAME using f$getjpi
- >#> 2 issue "SET HOST" to the node whose name I pass into the com file
- >#> 3 Accept my username as input at the username prompt on the machine to
- >#> which I am setting host to
- >#>
- >#I am not an expert in RTPAD.EXE/LOGINOUT.EXE, but it sounds impossible to me.
- >
- >It's not (at least under V5.4 and V5.5-2.) I'm told that this "functionality"
- >may dissappear in a future release. I've already emailed a similar response to
- >the original poster.
- >
- >$ user = f$getjpi(0,"username")
- >$ open/write t sys$scratch:t.com
- >$ write t "$ set host ''p1'"
- >$ write t "''user'"
- >$ close t
- >$ @sys$scratch:t
- >
- This bit will also work:
- $ host_name = .... (eg. 'p1)
- $ user_name = f$getjpi(0,"username")
- $ open/write data sys$scratch:user.dat
- $write data "''user_name'"
- $close data
- $ define sys$input sys$scratch:user.dat
- $ SET HOST 'host_name'
- $!
- $! we are now off at the remote host
- $!
- $ say "Logging off"
- $ LOGOFF
- $ set on
- $ exit
-
- >This won't work when connecting to an ULTRIX box running DECnet, since buffered
- >I/O is handled differently by UNIX.
- >
- >Now for the reason for the disclaimer: Don't even _think_ about adding a line
- >that includes the password. Yes, it works.
- ..And I've seen that done too! I took the password out. 8-)
-
- -- Vince
-
- ---------------------------------------
- vli@mprgate.mpr.ca |-) It works well under pressure: Another thing
- |-] you can say about your pillow. -- Mr Boffo
-