TELNET can be used in interactive mode with hosts attached to the local network. In order to determine whether inputs are directed to the TELNET client or to the remote host with which a dialog is being maintained, TELNET recognizes two operating modes:
command mode, in which commands are passed to the TELNET client.
input mode, in which data and commands are passed to the remote interactive host.
Only line-oriented dialogs are possible with TELNET. Consequently, if the remote computer is a Unix system, for example, the editor CED cannot be used. Similarly, if the partner is a BS2000 system, FHS cannot be used at all, and SDF and EDT can be used only in line mode.
The TELNET command ! can be used to switch from TELNET command mode to BS2000 or POSIX command mode.
The figure "Command mode and input mode" shows the three modes for entering data and commands and the transitions between them. (The precise behavior on switching to BS2000 or POSIX command mode with the ! command and to TELNET command mode with escape characters is given in the detailed description of the commands.)
Figure 6: Input modes
Starting TELNET
You start the TELNET client as follows:
START-TELNET
or TELNET
The client is terminated with the quit command.
In interactive mode, TELNET responds with a version number and the prompt telnet>. Task switch 1 must not be set. On starting TELNET, you will find yourself in TELNET command mode. In this mode, you can control TELNET and also retrieve data.
The open <ipadr> command connects you to a remote host. You will now be in the TELNET input mode and can direct any line-oriented commands to the operating system on the remote host. The connection to the remote system is cleared if the appropriate command to terminate the current process is issued on the remote operating system.
If you want to issue a TELNET command, you can interrupt the input mode by entering the escape character. In TELNET command mode, the connection to the remote system can be cleared by issuing the close command.
The predefined setting for the escape character is ^], but can be changed by using the escape command. The function of the
key on asynchronous terminals (Unix world) corresponds to the symbol ^. If the ^ character is to be transmitted, it must be entered twice.