DK:DIAL32.TXT DATE: 4-MAY-87 TIME: 21:05 Maarten van Swaay maarten@ksuvax1.BITNET Dept. of Computer Science Nichols Hall Kansas State University Manhattan, Kansas 66506 DIAL is a front end for terminal emulators that handle communication with a remote host over dialup lines. It runs under RT11V4 versions that support multiple terminals and time-out requests. DIAL should not require modification of existing emulators: it is designed to be invoked from a command file that will subsequently start the appropriate emulator. DIAL returns exception reports to monitor level by discarding or replacing the command file that called DIAL. Therefore DIAL need not be aware of the emulator for which it is establishing a connection. Furthermore it allows the user to control the consequences of DIAL exceptions by means of command files, without any need to modify either DIAL or emulators. Version 3.2 takes one of three exit paths: Failure to acquire or control specified LUN: discard command file and exit Unexpected response from modem: reset modem, replace command file with SY:DIAL.ABT Successful dialog with modem or host: continue command file DIAL can accept intermixed input from the keyboard and from a command file. If no command file is open, DIAL will of course take all input from the keyboard. In that mode, DIAL must be dismissed from the keyboard with ^C, after which the appropriate emulator must be started with a RUN command. Certain remote systems require a variable protocol, e.g. during penetration through a terminal switch. Occasionally that may require transmission of a varying amount of text, until an appropriate response from the host is is received. DIAL supports such situations by means of a group of input commands, all of which begin with <.> in the left margin: .R (.Reset) Can only be supplied from a command file; not recognized if entered from the keyboard. Ignore remainder of this command line, and issue a reset sequence (Hayes protocol: <+++> ); then print message: ?DIAL-I-modem reset to command mode If the value of variable HAYES is set to zero at compile time the reset function will be a no-op. .M (.Manual) Can only be supplied from a command file; not recognized if entered from the keyboard. Ignore remainder of this line, and retrieve the next line from the current command file. Transmit the front end of that line, then before any response is displayed, print a message: ?DIAL-I-entering manual mode, exit with DIAL then echoes all incoming text from the modem port and transmits all keyboard text to the modem port. Traffic proceeds char-by-char in both directions, without any attempt at synchronization. Keyboard text is not echoed locally under the assumption that an echo will be produced by the modem port. .C (.Comment) Can only be supplied from a command file; not recognized if entered from the keyboard. The .C command is treated as a no-op by DIAL and does not trigger a warning message. The entire .C line will normally be displayed on the local screen by RMON, however, so that .C lines can be used to supply descriptive text from a command file to the user. Can only be supplied from the keyboard. The inserted by RMON after is always discarded by DIAL. An keystroke (from an enabled keyboard) will switch the input stream back to the current command file. The stream-switching commands .M and serve not only to insert manual text between parts of a command file. The commands can also be used in places where manual synchronization is unavoidable; the keystroke then becomes the command that allows DIAL to retrieve and transmit the next line from a command file. In automatic mode (keyboard disabled) DIAL attempts to synchronize its dialog with a minimum of cooperation from the remote system: DIAL expects at least one returned character within 30 seconds after each transmitted . On receipt of that character DIAL will keep listening to the remote host until it detects an idle period of at least two seconds. Only then will DIAL retrieve another line of text for transmission to the remote host. In automatic mode DIAL will echo all text received from the remote host within the allowed time span. Any characters received from the remote host after a quiet period of two seconds or more will be discarded without display. Normally each line from a command file will be displayed on retrieval. On transmission of that line the remote host may return an echo, which will also be displayed locally. It is possible to suppress the display of text retrieved from a command file with the SET TT QUIET command, but that suppression will have a cosmetic effect only, and may obscure some of the activity of DIAL. The Hayes autodial protocol allows software control of a modem. The modem will return various responses which serve as performance reports. DIAL contains a rudimentary parser that will split a command line into outgoing text and a single expected response character. Unless otherwise defined the separator character recognized by the parser is the "<" sign. The parser will replace the separator by <200>, so that text on the left of the separator can be transmitted with a .MTOUT call. The first character beyond the separator is returned by the parser for a subsequent response test. Manual mode (keyboard enabled): It is not always possible to define the entire logon sequence in a script: some remote sites may require a variable amount of text and null lines to select the appropriate transmission rate, etc. The .M command provides a mechanism to handle such situations. The line after the .M command is parsed and transmitted as usual. Then DIAL prints an information message, after which the keyboard is enabled in character mode. All text arriving at the modem port is displayed on the screen, and each character typed at the keyboard is transmitted immediately to the modem port. Any expected response that was specified on the last-retrieved command line is ignored. Control is switched back to the current command file on detection of entered from the keyboard. Note: the code inserted by RMON after each keystroke is discarded by DIAL. DIAL has provision for several compile-time options: HAYES default = 1 turns on Hayes reset sequence if non-zero LUNREM default = 2 defines modem port (LUN number) SHORT default = 2 patience between modem response characters LONG default = 30 patience before first modem response CSEP default = '< separates modem command and expected response These can be defined with a preamble file DIAL.OPT that contains any desired option definitions. To compile a version of DIAL with a preamble file DIAL.OPT, use the commands MACRO/OBJ:DIAL DIAL.OPT+DIAL ! assume all files on DK: LINK/EXEC:SY:DIAL ! write .SAV file to SY: DEL/LOG DIAL.OBJ Examples below refer to the computer environment at Kansas State University, which includes a National AS5 mainframe running VM/SP accessible via an EQUINOX data switch. The data switch provides access to the VM/SP environment via several terminal controllers that can support a variety of terminals. The KSUVMCC path does not insert screen control sequences; it is the preferred access path for the CMS11 utility running under RT11 for interactive use and for transmission of text files. Example command file to connect to a VM account via the cluster controller (comment fields will be stripped by the RT11 indirect file processor): NOTE: if a line from a command file contains no text in front of the comment marker, RT11 will remove the entire line, even if the is not set in the left margin. Therefore a null line in a command file cannot be commented. ! AUTO.COM for auto-dial modem with Hayes protocol R DIAL .R ! reset Hayes modem ATV0T<0 ! set Hayes modem to short-response mode ATD776-1566 <1 ! dial up mainframe .M ! enable KB after null line that wakes up the switch ! after proper response has been received .M ! set up another wait to allow switch time KSUVMCC ! select cluster controller ^C ! dismiss DIAL R CMS11 ! start CMS11, must be version 3.7 or later SY:LOGON.FAC ! for some obscure reason, CMS11 dislikes a ! comment on the line that defines its logon dialog. If an auto-dial modem is not available, the command file could be: ! MANUAL.COM R DIAL .C DIAL-Q-Please dial 776-1705 .M ! set up wait to allow manual dial-up ? ! and send a question mark to never-never land ! When the phone is answered, strike ! which continues with the null line below: KSUVMCC ! select cluster controller port ^C ! dismiss DIAL R CMS11 ! and start CMS11 SY:LOGON.FAC Experimenting may reveal that some .M waits can be eliminated. It appears that the KSUVM switch does not waste much time, and that the two seconds built into DIAL are sufficient for the actions taken by the switch.