From: moravec@Ph1.Uni-Koeln.DE (Andreas Moravec)
Newsgroups: vmsnet.networks.tcp-ip.multinet
Subject: Re: pathworks and tcp/ip
Date: 26 Sep 1992 22:21:39 GMT
Organization: University of Cologne, I. Physik. Inst., Germany
Reply-To: moravec@Ph1.Uni-Koeln.DE
NNTP-Posting-Host: newton.ph1.uni-koeln.de

Problems to run Pathworks/DOS with TCP/IP against MultiNet rexec-service

In article <1992Sep19.105543.1@lure.latrobe.edu.au>,
 ccmk@lure.latrobe.edu.au writes:
>In article <1992Sep17.084521.997@beckman.com>, dsroberts@beckman.com writes:
>> My problem with the timeout turned out to be that I do several things (like set
>> commands and check news) that make my login quite long, and the attempt to
>> connect always times out.  Take all this stuff out of my login.com and it
>> connects fine.  Is there a way to change the timeout to something longer?  Can
>> it be done from the MultiNet side?  I'd really not like to have to dictate to
>> the clients how their PC's should be set up.
>
>Run DWCONFIG and in there is a timeout field which defaults to 30s
>but can be changed to whatever.  I don't know if this change can be
>done for eXcursion.
>
>I am still having problems with dwdos and eXcursion making VMS
>connections under TCP/IP, even after all the advice that has been
>posted here recently.  Some programs work, others don't. I have
>never got decw$terminal to work, for instance.  This is all only from

this cannot work, you can check that (after having created a display
device = set disp/crea/nod=xx/trans=tcpip). Programs DECW$TERMINAL
and DECW$TERMINAL_CREATE should not be invoked via RUN, instead
you should use CREATE/TERMINAL or CREA/TERM/DETA
(see TERMINAL.COM below)

>the applications manager, of course.
>
>Mark Kosten
>(ccmk@latrobe.edu.au)

With help of Fred Zwarts' command file we haved worked out a solution
which seems to work now for us:

1. include this into SYS$MANAGER:SYLOGIN.COM:
*******************************
$! vv='f$verify(0)
$	typ   = "write sys$output"
$	MODE  = f$mode()
$
...
$
$ if MODE .eqs. "OTHER" .and. f$extract(0,4,f$trnlnm("TT")) .eqs. "_MBA"
$ then
$!	we assume it is a PC r_exec connection, it likes that:
$	typ ""
$	setenv == "@sys$utilities:x_tcpip/output=NLA0: """
$ endif
*******************************

2. check user's SYS$LOGIN:LOGIN.COM:
*******************************
$! verify='f$verify(0)
$! *********************
$! * example LOGIN.COM *
$! *********************
$!
$! (first line needed to switch off verification,
$!   --> network services)
$!
$! some commands which should be run in all modes:
$
$ set protection=(S=RWED,O=RWED,G,W) /default
$
$ SPO == "SET PROTECTION=(S=RE,O=RWED,G,W)/LOG"
$
$ define/job LASERJET LASERJET4
$
$ SYLOG = f$trnlnm("SYS$LOGIN") - "]" + "."
$! needs to be in SYlogin or login to be used by DECW$WSINIT
$ define/job DECW$USER_DEFAULTS 'SYLOG'DECW]
$
$
$! batch mode only:
$ if f$mode() .eqs. "BATCH"
$ then
$	write sys$output " now running in batch mode,"
$	write sys$output " really running in batch mode."
$ endif
$
$
$! very IMPORTANT: output only in interactive or batch mode,
$!  e.g. WRITE SYS$OUTPUT ..  SHOW QUOTA
$! otherwise network jobs do not work, e.g. Pathworks, TCP/IP r-services
$
$! interactive mode only:
$ if .not. f$environment("INTERACTIVE") then $ exit ! from LOGIN.COM
$! (do not use f$mode().nes."INTERACTIVE" here !)
$
$ define/job NEWSRDR_HEADER_CACHE_SIZE 200
$ define/job MX_SIGNATURE	sys$login:plan.txt
$ show quota
$
$! set prompt command only in interactive mode:
$ set prompt = "aa-> "
*******************************

3. command file called by SETENV (our name=SYS$UTILITIES:X_TCPIP.COM):
*******************************
$! vv='f$verify(0)
$! wait 0::1
$!-----------------------X_TCPIP----------------------------------------------
$! Procedure to emulate the UCX SHELL for use with PCSA X-windows server.
$! The parameter P1 contains three commands separated with semi-colons
$! The first two commands define the X-server and screen in two differents
$! formats. Check that they contain the same information.
$
$!	define SYS$ERROR NLA0:
$	define SYS$ERROR SYS$LOGIN:X_TCPIP.LOG
$
$	CMD1 = f$element(0, ";", P1) - " " - " " - ";"
$	CMD2 = f$element(1, ";", P1) - "=" - "=" - ";"
$	if CMD1 .nes. CMD2 then exit 1
$	DISPLAY_PART = CMD1 - "DISPLAY"
$	delete/symbol CMD1
$	delete/symbol CMD2
$
$! From this information extract the node address, the server and the screen
$! number. The node address is separated from the rest  with a column.
$
$	NODE = f$element(0, ":", DISPLAY_PART)
$	REST = f$element(1, ":", DISPLAY_PART)
$
$! The rest contains the server and screen number separated with a dot.
$
$	SERVER = f$element(0, ".", REST)
$	SCREEN = f$element(1, ".", REST)
$	delete/symbol REST
$
$! Define the display
$
$	if DISPLAY_PART .nes. ""
$	then
$		set display /create /transport=TCPIP /node='NODE' /server='SERVER' /screen='screen'
$	else
$		set display /create /transport=LOCAL
$	endif
$	delete/symbol DISPLAY_PART
$	delete/symbol NODE
$	delete/symbol SERVER
$	delete/symbol SCREEN
$
$! The following lines contain the filenames of the program to be executed.
$
$	COUNTER = 2
$ GET_PROG:
$	X_TCPIP_CMD = f$element(COUNTER, ";", P1)
$	COUNTER = COUNTER + 1
$	if (X_TCPIP_CMD .nes. "") .and. (X_TCPIP_CMD .nes. ";")
$	then
$		X_TCPIP_CMD = f$parse (X_TCPIP_CMD, "SYS$SYSTEM:.EXE")
$		if f$search(X_TCPIP_CMD) .eqs. "" then $ goto GET_PROG
$	endif
$	FILE_TYPE = f$parse(X_TCPIP_CMD, , , "TYPE")
$	delete/symbol COUNTER
$
$	if FILE_TYPE .eqs. ".EXE"
$	then
$		delete/symbol FILE_TYPE
$!		define/user SYS$OUTPUT NLA0:
$		define/user SYS$OUTPUT SYS$LOGIN:X_TCPIP.LOG
$ 		run 'X_TCPIP_CMD'
$	else
$		if FILE_TYPE .eqs. ".COM"
$		then
$			delete/symbol FILE_TYPE
$!			@'X_TCPIP_CMD' /output=NLA0:
$			@'X_TCPIP_CMD' /output=SYS$LOGIN:X_TCPIP.LOG
$		else
$			open/write error SYS$LOGIN:X_TCPIP_ERROR.LOG
$			write error " X_TCPIP bad file name: use only correct file names of types "".EXE"" and "".COM"""
$			write error " string sent:"
$			write error " setenv ''P1'"
$			close error
$		endif
$	endif
$	if f$search("SYS$LOGIN:X_TCPIP.LOG;-12") .nes. "" then purge/keep=6 SYS$LOGIN:X_TCPIP.LOG
$ exit 1
$!
$!> I cannot start X application with DWDOS386 or DWDOS286 over TCP/IP. 
$!> If I try to start, nothing happens. At the PC (486 with DOS 5.0) I get no 
$!> error messages.
$!> 
$!> On the multinet VMS server I get the following error message :
$!> MultiNet Server: R_SERVICES: socket read error, %MULTINET-W-ECONNRSET, 
$!> connection reset by peer
$!
$!The problems is that if DWDOS386 or DWDOS286 runs the X-protocol over TCP/IP
$!it thinks that the server is a U**X machine. The DWDOS developpers
$!apparently thought that only U**X speaks TCP/IP and only VMS speaks DECnet.
$!So if you tray to start up an application e.g., DECW$SESSION, then, when
$!using DECnet it sends commands to the server like
$!	SET DISPLAY
$!	RUN DECW$SESSION
$!but when using TCP/IP it sends commands like
$!	setenv DISPLAY	;	DECW$SESSION
$!
$!What I did to solve this problem on our VAX/VMS system with Multinet is the
$!following:
$!
$!I define in my LOGIN procedure a symbol SETENV:
$!$	SETENV == "@DCL_PROCS:X_TCPIP """
$!This procedure X_TCPIP follows below. It translates the setenv command into
$!a SET DISPLAY command. Extracts the name of the program to be executes and
$!runs it in a way depending on the file type of the program.
$!
$!Fred Zwarts	KVI, Groningen, Netherlands	Internet:	F.Zwarts@KVI.nl
$!Phone:		(+31)50-633619			Telefax:	(+31)50-634003
$!X400:		C=nl;ADMD=400net;PRMD=surf;O=KVI;S=Zwarts;G=Fred
*******************************

4. command file TERMINAL.COM (type as application name SYS$LOGIN:TERMINAL.COM,
    it will be called by X_TCPIP.COM)
*******************************
$ create/terminal/detached -
/window=(x_pos=10,y_pos=10,row=15,col=40)/litte_font
*******************************

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       KOSMA = Koelner Observatorium fuer SubMillimeter-Astronomie
 Andreas Moravec               TEL      +49 (221) 470 3558
 I. Physikalisches Institut    FAX      +49 (221) 470 5162
 Universitaet zu Koeln         TELEX    888 2291 UNIK D
 Zuelpicher Str. 77            INTERNET Moravec@Ph1.Uni-Koeln.De
 5000 Koeln 41, Germany        X.400    S=Moravec;OU=Ph1;P=Uni-Koeln;A=DBP;C=DE
Newsgroups: vmsnet.networks.misc