!START-OF-VAXNET.HLP
!
!	VAXNET  -  VAX Hosted Virtual Terminal Handler and File Transfer
!		   Program for Communication with Remote VAX/VMS,
!		   PDP10/DECsystem-10, or PDP11xx/(RSX11M/V3.1 with FORTRAN
!		   IV Plus)
!
!Authors:  Roger Lipsett, John Thompson  Intermetrics
!
!Date:	   22 May 1979
!Edited:   27 July 1979 To reflect changes for REV 1.54
!
!Modules:
!
!VAX HOST: VAXNET.FOR, GETSEND.FOR, SETPRN.MAR
!
!REMOTE CPU's
!
!VAX:	   SNDRCVVAX.FOR
!
!PDP10:	   SNDRCV.F10, SPLUTL.MAC
!
!PDP10 at Carnegie Mellon University:    SNDRCVCMU.FOR,SPLUTL.MAC
!
!PDP11:	   SNDRCV11M.FTN,TECIN.FTN
!
!Program Generation:
!
!BOOTSTRAP:  It is possible to downline load any or all of VAXNET sources
!	   using TECO on a remote VAX or PDP10 and the TECOINPUT command
!	   on the host VAX.  On a PDP11 one must first type in a short
!	   program, TECIN.FTN, F4P and TKB it, RUN it and use the TECO
!	   INPUT command as on the -10 or VAX.  See the TECOINPUT command
!	   for further information.
!
!VAXNET	   LOGIN UNDER SYSTEM MANAGER'S ACCOUNT
!  ON	   FOR VAXNET
! HOST	   FOR GETSEND
! VAX:	   MAC SETPRN
!	   LINK VAXNET,GETSEND,SETPRN
!	   COPY VAXNET.EXE [SYSEXE]*
!	   SET DEF [SYSEXE]
!	   SET PROT=(SY:RWE,OW:RWE,GR:RE,WO:RE) VAXNET.EXE
!	   RUN INSTALL
!	   VAXNET /PRIV=(PHY_IO,ALTPRI,PSWAPM)
!	   Or, for later updates, VAXNET/REPLACE.
!	   (CTRL Z)
!	   VAXNET will perform the equivalent of the following command
!	   for the remote VAXNET port:
!	   SET TERM TTnn: /LOW/TAB/NOECHO/REM/PASS/SCOPE/WIDTH=132/-
!	   NOWRAP/SPEED=300 or 1200
!	   At the termination of VAXNET, the terminal characteristics
!	   will be restored to /ECHO/INTERACTIVE/WRAP/WIDTH=80.
!
!	   DZ11 port TTnn should be dedicated to the modem which is used for
!	   dialing up to the remote CPU, but it can be used for dial-up
!	   when VAXNET is not in use.
!
!REMOTE CPU's:
!
!PDP10:	   COMPIL SNDRCV.FOR	! Unnecessary, as the LOAD will compile it.
!	   COMPIL SPLUTL.MAC	! Unnecessary, as the LOAD will compile it.
!	   LOAD SNDRCV,SPLUTL
!	   SAVE SNDRCV
!
!VAX:	   FOR SNDRCVVAX
!	   LINK SNDRCVVAX
!
!PDP11:	   F4P SNDRCV11M=SNDRCV11M
!	   TKB SNDRCV11M/-CP=SNDRCV11M
!	   F4P TECIN=TECIN
!	   TKB TECIN/-CP=TECIN
!
!	   When you RUN SNDRCV11M, it must have its PRIORITY set high enough
!	   to insure that the WTQIO will always get all the characters that
!	   come into the PDP11 terminal port.  A priority of /PRI=51 will
!	   usually work.  Thus,   RUN SNDRCV11M /PRI=51
!	   The TECIN program also requires adequate priority.
!	   N.B.  You must be privileged to run tasks in this way.
!
VAXNET is a virtual terminal handler hosted on the VAX that contains
protocol and procedures for transferring ASCII files to or from remote
CPU's from or to the VAX via an asynchronous modem connection.

A procedure for transmitting binary files in which the data is in industry
compatible mode on the -10 has also been invented, and an implementation of
-10 to VAX transfer of AN/UYK-20 SYSGEN files can be used as a template for
development of procedures for transferring other types of binary files
between other systems.

Print the DB0:[SYSHLP]VAXNET.HLP file for installation procedures.

For more information see the topics below.

*INTRODUCTION

VAXNET has two parts:  a virtual terminal handler and a command driven
communications protocol.

The virtual terminal handler is designed to make the terminal that VAXNET
runs from seem like it is directly connected to the remote CPU.  The
terminal that VAXNET runs from is called the local VAXNET terminal.  The
DZ11 port that VAXNET uses to talk to the modem is called the remote
VAXNET port or the VAXNET output port.  The modem connects over the
telephone network to the remote CPU dialup terminal port.

The VAXNET user switches back and forth between the virtual terminal
handler and the communications protocol using the procedures and
commands described below.  Before one of the protocol initiating commands
is issued, it is necessary for the user to RUN the appropriate "slave"
program (SNDRCVVAX, SNDRCV, or SNDRCV11M) on the remote CPU.  The "slave"
program provides the protocol on the remote CPU.

There are several things to remember about the virtual terminal part
of VAXNET.  One is that all prompts from remote CPU's occur about one
second after typing carriage return.  Thus when you expect a prompt for
PPN # or PASSWORD during LOGIN, the prompt may seem a little slow.

	*** DO WAIT FOR EACH PROMPT AND DON'T TYPE AHEAD ***

In general,the VAX terminal handler reads only input lines from remote
CPU's which are CR terminated, and hence a timed out read is necessary
to handle the non-terminated prompt.  The VAX terminal handler
is used to echo your typed input.  So when you type a LOGIN [123,456]
command, a -10 will also echo it.

Occasionally, the virtual terminal part of VAXNET will generate extra
line feeds.  Should this occur, type a CTRL C followed by a C and CR
to clear the DZ11 remote port typeahead buffer and resynchronize.

There are some peculiarities about default terminal characteristics
that you will be able to change once you get logged in to the remote CPU.
These settings are given below following the general discussion.  Another
restriction is that only carriage return and escape can always be sent by
typing them directly.  (N.B. The VAX will echo the escape as $.)
It is safest to send other control characters using the CTRL C interrupt
mechanism described below, although many control characters to a -10
such as CTRL T, CTRL S, CTRL Q can be sent easily if the -10 is not
sending characters.

It is possible to use the virtual terminal handler part of VAXNET to
run programs like TECO and other editors on -10's and VAX's, albeit
one must strictly adhere to not typing ahead and always waiting for
prompts.  It is generally quite difficult to run the debuggers.

Finally, make certain that the local terminal you use to run VAXNET on
is at least as fast as the modem you use to communicate with the remote
CPU.  If the local terminal is too slow, the typeahead buffer for the
remote VAXNET port will get filled faster than VAXNET can service it
because of the delay in writing to the slow local terminal.  Although
it is quite possible to clear this typeahead buffer by typing CTRL C
followed by C and CR, it is not pleasant to work in this mode.

*CONTROL_CHARACTERS

To send control characters CTRL C is first typed followed on the next
line by the upper or lower case alpha(s) that you wish to send.  Sending
two CNTRL C's to a -10 or VAX would be done as follows:


^C
CC

Unfortunately, one cannot use this mechanism to send CTRL C's to RSX11M
to get back to MCR level.  Thus there is no easy way to abort typeout
from say a PIP TI:=FILENAME.FOR command.  To abort the SNDRCV11M
program, one does type CNTRL C, and then after the abort message
types C.  The sequence would look like

^C
 MESSAGE ABOUT ABORTING
C

Whenever one uses the ^C method that does not interrupt SNDRCV,
any sequence of characters longer than 2 is expected to be a command.
A CTRL C followed by another CTRL C will trap back to the VAX command
interpreter. (This is not the proper way to terminate VAXNET.
Instead, use the STOP command.)

*PROTOCOL_COMMANDS

Before each of the protocol initiating commands, except for STOP,
is issued, it is necessary for the user to RUN the appropriate "slave"
program (SNDRCVVAX, SNDRCV, or SNDRCV11M) on the remote CPU.  The "slave"
program provides the protocol on the remote CPU.

To begin a command, CTRL C is first typed followed on the next line
by one of the following commands:

	GETA or GETA[SCII] - get an ASCII text file from the -10
	GETL or GETL[ISTING] - get a FORTRAN carriage control
			       formatted ASCII listing file from -10
	GETS or GETS[YSGEN] - get a ANS/UYK-20 SYSGEN file from -10


	SENDA or SENDA[SCII] - send an ASCII text file to the -10


	STOP - stop the VAXNET program and close down properly

	TECO or TECO[INPUT] - use TECO on -10 or VAX to downline
			      load source text for SNDRCV, etc
			      without using protocol.  On the PDP11,
			      since RSX11M does not allow disabling
			      echo, one must use a short 19 line
			      program called TECIN to write the
			      input from the TECO command into a
			      prenamed file SR.FTN.

Commands can be abbreviated or written out or partly written out.

The TECOINPUT command requires some more explanation.  First start TECO.
On a -10 the command MAKE FILE.F10 will get you into TECO and create
the file FILE.F10.  On a VAX the command should be

	MCR TEC
	EWFILE.FOR$$

On RSX11M use RUN TECIN.
At this point the VAXNET command TECO should be given.

	^C
	TECO
	NAME OF THE VAX FILE? you usually type SNDRCVxxx.yyy

The TECO procedure will format and send the VAX file to the file open
on the remote CPU.  There will be no checksumming.  When the file ends
on the VAX, the remote file is closed and the remote program (TECO or
TECIN) stops.  VAXNET is now in virtual terminal mode again.
Remember, the TECIN program will have named the file SR.FTN and you
will probably want to rename it.

*EXAMPLE

A sample terminal session with VAXNET is included here with comments:

$SHO TERM TTnn:  !Check if anyone is using the port to the remote CPU
		 !If OWNER=SELF, you can use it
$MC VAXNET	 !This will run the installed VAXNET program
 INTERMETRICS VAX VIRTUAL TERMINAL HANDLER - VAXNET - (REV x.yz)
 NAME OF VAXNET DZ11 OUTPUT PORT (e.g. _TTB7:)?  you type say TTB7
 TTB7 RCHANIN NOT ASSIGNED  !This means either someone else has the
			    !modem or the modem should be turned off
			    !then on a few times to clear TTB7.
$MC VAXNET	 !Try again
 INTERMETRICS VAX VIRTUAL TERMINAL HANDLER - VAXNET - (REV x.yz)
 NAME OF VAXNET DZ11 OUTPUT PORT (e.g. _TTB7:)?  you type TTB7

 SET TERMINAL CHARACTERISTICS.
 ALWAYS WAIT FOR PROMPTS.
 TYPE CTRL C FOLLOWED BY ANOTHER C TO STOP EXTRA BLANK LINES.

	!The above messages are given as reminders.
	!Now dial up a -10 from the modem connected to TTB7
	!Wait about 15 seconds after seeing carrier go on in the modem
	!and get the -10's attention by sending a CTRL C.
^C
C

FOO-603-18 hh:mm:ss TTYnn system xx	!-10 sends these
Please LOGIN or ATTACH			!messages

.LOGIN [123,456]	!You type this
LOGIN [123,456]		!-10 echoes this
			!-10 may echo this on top of your line

JOB # etc   TTYnn	!-10 sends this
Password:ABCDEFG	!You type password, VAX echoes, -10 doesn't

nnnn   dd-mmm-yy   day	!-10 sends some date info
No mail			!and may or may not send some mail

.TT NO ECHO	!You type
TT NO ECHO	!-10 echoes

.TT NO BLANKS	!You type

.TT NO FILL	!You type

.TT NO CRLF	!You type
.TT TABS	!You type
.TT LC		!You type - This finishes setting characteristics on -10

.RUN DSKD:SNDRCV[132,1617] !Start up the -10 program that communicates
			  !with the VAX
^C		!Now give the appropriate VAXNET command
GETS		!We want a SYSGEN file here
WHAT IS THE NAME OF THE -10 FILE? SOFTIM.ABS  !We answer with file name
NAME OF THE VAX FILE? SOFTIM.ABS	      !Again answer file name
					      !Either the -10 or the VAX
					      !filespec, or both, may be
					      !fully qualified.
RECORDS    1 THROUGH   10 SUCCESSFULLY TRANSFERRED. !Progress report
RECORDS   11 THROUGH   20 SUCCESSFULLY TRANSFERRED. !More progress
...
...
RECORDS  221 THROUGH  227 SUCCESSFULLY TRANSFERRED. !Last part
FILE TRANSMISSION COMPLETE,        28976 BYTES TRANSFERRED.

STOP	!FORTRAN STOP message from -10


END OF EXECUTION   !Message from -10

.K/F	!LOGOUT from -10
^C
STOP	!Want to shut down VAXNET
$LO	!LOGOUT from VAX

*CANCEL_FILE

VAX or -10
----------

Should it be desired to cancel the file transmission process, this is
accomplished by doing a CTRL C operation to get out of transmission
mode.  Then you will be in virtual terminal handler mode and can send
two CTRL C's to abort the SNDRCV process on the remote CPU.  You can now
restart the transmission process or do whatever else is appropriate.

PDP11 RSX11M
------------

Type CTRL C, and then after the abort message, type C.

*SPECIAL_CHARACTERS

ARPANET PROBLEMS
----------------

Using the SENDA command from VAXNET via an intermediary TIP will give
difficulty with text containing @ symbols.  The simple solution is
to change all @ symbols to some other little used character like the
back slash symbol \.  Do this prior to running VAXNET using TECO.
Once transmitted, the files with \ can be changed back to @ on the remote
CPU using TECO and the command <FS\$@@$;$>.  
An alternative procedure is to change the TIP command symbol using
the TIP command
	@I octal #
   e.g. @I 134  makes \ the new TIP command symbol

PDP11 RSX11M/V3.1 TABS
----------------------

Tabs get sent to RSX11M/V3.1 without difficulty.  However, there is no
way to get the terminal driver to send tabs to the outside world.  The
SNDRCV11M.FTN program therefore converts all tabs to back slash before
sending them out.  At the VAX host use TECO on any received files to
change the \'s to tab.  e.g. <FS\$	$;$>.

*WARNING

During SEND or GET commands transmission errors may occur.  Should
this occur during "handshaking", VAXNET will drop back to virtual
terminal level and give a message.  If the errors occur during
file transmission, the resulting error recovery may or may not go
into a loop.  Looping will be obvious with many "...RETRYING"
messages.  When this happens, CTRL C and stop SNDRCV as described
above.  If normal transmission resumes, the destination file may be
corrupted in certain circumstances.  We hope to fix this problem soon.
Meanwhile, conservative practice is to discard a file which had such
transmission problems and to retransmit the file to its destination.

Almost all looping errors are caused by improper terminal settings
on the remote CPU such as tabs or lower case being converted to
blanks and upper case, respectively.  Sometimes the looping errors
are caused by a really bad modem or phone connection.  In practice
we typically send thousands and thousands of lines of code using
1200 and 300 baud modems with only occasional errors.

*SUMMARY

To Start VAXNET on VAX    $MC VAXNET


Remember One Second Delay for Prompts from Remote CPU's

To Send Control Characters		To Send Commands

^C					^C
Character				Command Name

			Minimum
Command			Abbreviation

GETASCII  		GETA
GETLISTING		GETL
GETSYSGEN 		GETS
SENDASCII 		SENDA
STOP			STOP
TECOINPUT		TECO


PDP10 SUMMARY
-------------

To Start Complementary PDP10 Program   RUN DSKD:SNDRCV[132,1617]

PDP10 TTY Settings

TT NO ECHO
TT NO BLANKS
TT NO CRLF
TT NO FILL
TT TABS
TT LC

VAX SUMMARY
------------

Before dialing up get the SYSTEM MANAGER at the remote VAX to set the
dial up port to NOECHO.  e.g. SET TERM TTxx /NOECHO/PERM

To Start Complementary Remote VAX Program   RUN SNDRCVVAX

Once logged on do the following TT settings

VAX TT Settings

SET TERM TT /NOWRAP/WIDTH=132/TAB/NOBROADCAST/LOWERCASE


PDP11 RSX11M/V3.1 SUMMARY
_________________________

After logging on to the PDP11 get the SYSTEM MANAGER to alter the basic
priority of your task to guarantee adequate QIO response.

e.g. ALT TT7 /PRI=51. should do

Alternatively get the SYSTEM MANAGER to install SNDRCV with adequate
priority.

e.g. INS SNDRCV /PRI=51.

Then you can RUN SNDRCV without losing input characters.

PDP11 RSX11M/V3.1 Terminal Settings

SET /CRT=TI:
SET /BUF=TI:200.
SET /LOWER=TI:

!
!END OF VAXNET.HLP

