We have found KERMIT extremely useful for transferring files between
our VAX and our PDP-11s.  It beats sending files back and forth by
mag tape, but now that I can transfer files, why can't I have one 
computer system direct another system to do something with the files
I send it?  As far as I know, there is no way to use KERMIT to start
up processes on another system from a command file.  You can write
command files to send the command lines (.OPEN TTn: ... .DATA ...),
but it is hard to tell whether the command works or when it is done.

These programs/routines allow you to invoke programs on an RSX system 
from a VMS system.  They write commands to the RSX system, and read
back the responses.  All of the dialog (except passwords) are written
to SYS$OUTPUT.  There is minimal recovery from unexpected conditions.
(PDPLOGIN will issue a BYE, followed by another login if it gets
a "HEL -- Other User Logged On" from the RSX system.)  It depends
on RSX responding with certain strings, so if DEC changes any of the
messages it now recognizes, it will not work.  It does work with
RSX-11M V4.0.  It may work for other versions, or with M+.


Installation
------------

VMS:
    SYSTARTUP.COM

	$ DEFINE TERM$PDP11 TTB6:	! TERMINAL CONNECTED TO PDP-11
	$ SET TERMINAL TERM$PDP11	/PERMANENT /NOHOSTSYNC /NOTTSYNC -
					/NOBROADCAST /NOECHO
	$ SET PROTECTION=(S:RWLP,O:RWLP,G:RWLP,W:RWLP) TERM$PDP11/DEV

    LOGIN.COM

	$ ALLPDP11 :== @SYS$CMD:ALLPDP11
	$ PDPLOGIN :== @SYS$CMD:PDPLOGIN
	$ PDPWAIT  :== @SYS$CMD:PDPWAIT

RSX:
    STARTUP.COM

	SET /NOECHO=TT14:

Use
---

I use these commands in conjunction with a captive command procedure
on the RSX system.  The RSX login always begins by running KERMIT SERVER.
It then receives some number of files from the VMS system, one of which
is the "control file".  The command procedure reads the control file to
find out what to do, then does it.

To print a number of files on the other system, the command procedures
might look like this:

	VMS:	$ open/write ctl PRINT.CTL	! Control file
		$ write ctl "DIABLO"		! Queue name
		$ write ctl "FILE1.MEM"		! File to print
		$ write ctl "FILE2.MEM"		! File to print
		$ write ctl "FILE3.MEM"		! File to print
		$ close ctl
		$ allpdp11
		$ loginpdp user pwd
		$ define/user sys$command sys$input
		$ define/user ker$comm term$pdp11
		$ kermit
		send PRINT.CTL
		send FILE1.MEM
		send FILE2.MEM
		send FILE3.MEM
		bye
		$ pdpwait 60			! Max wait with no response


	RSX:	.enable substitution
		kermit server
		.openr PRINT.CTL
		.read queue
		.loop:
			.read file
			.ift <EOF>  .goto done
			print 'queue':='file'
			.goto loop
		.done:
			bye


These programs have not been in use for very long, so there may still
be some bugs in them.  If you find any, or have any questions about them,
please let me know.

John P. McGrath, Analyst
American Newspaper Publishers Association
Technical Research Department
P.O. Box 17407, Dulles International Airport
Washington, D.C.  20041
(703) 620-9500

