Previous | Contents | Index |
With the TELNET software in TCP/IP Services, you can log in to a remote internet system. This is called establishing a TELNET session. Your terminal appears to be attached directly to the remote system.
You can establish a TELNET session with a host that uses IBM 3270 model terminals (TN3270).
Note that you can also use RLOGIN to log in to remote internet hosts. However, RLOGIN does not have the ability to manage a 3270 session. To determine the best remote login service for your needs, see Section 1.1.2. For more information about RLOGIN, see Chapter 3.
The following table lists the TELNET/TN3270 network terminal services and the sections that explain how to use them.
Capability | Section |
---|---|
Use either DCL or UNIX command syntax. | 4.1 |
Establish a network terminal session with any other host that uses TCP/IP as a transport. | 4.3 |
Log all terminal output to a file. | 4.5 |
Toggle between the remote host and the local TELNET prompt. | 4.7 |
Suspend TELNET/TN3270 to spawn a subprocess at the DCL prompt. | 4.8 |
Establish multiple TELNET sessions. | 4.9 |
Toggle between open sessions. | 4.9.1 |
Customize the way TELNET interprets control characters, sends and receives transmissions, and displays processing on your terminal. |
4.6.2
4.10 |
Send commands to the remote host that affect processing of commands you have entered. | 4.11 |
Run IBM 3270 model terminal emulation (TN3270). | 4.12 |
Record a TN3270 screen's contents. | 4.12.5 |
To use the network terminal services, you need the following:
To use TELNET, enter the commands summarized in Table 4-1. (For complete command descriptions, see Section 4.13.)
DCL Style | UNIX Style | Description |
---|---|---|
Starting (at the DCL Prompt) | ||
TELNET | telnet | Invokes TELNET. |
TELNET remote_host | telnet remote_host | Invokes TELNET and establishes a connection to a remote host. |
TN3270 | N/A | Invokes TELNET and TN3270. |
TN3270 remote_host | N/A | Invokes TELNET, runs TN3270, and establishes a connection to a remote host. |
Getting In and Out of Sessions | ||
CONNECT | open | Establishes a connection between the local host and a remote host. |
CREATE_SESSION | N/A | Establishes a pseudodevice and connects it to a remote listener port. |
DELETE_SESSION | N/A | Deletes a pseudodevice created by the CREATE_SESSION command. |
DISCONNECT | close | Terminates your current session. |
Ctrl/] | Ctrl/] | Takes you from the remote host back to the TELNET prompt. |
EXIT | quit | Closes open connections and exits from TELNET. |
HELP |
help
? |
Invokes online help. |
RESUME | [Return] | Resumes an open connection. |
SPAWN | z | Suspends your TELNET session and takes you to the DCL prompt. |
Customizing the TELNET Environment | ||
DISABLE AUTOFLUSH | toggle autoflush | Disables the automatic flushing of output when interrupt characters are sent. |
DISABLE AUTOSYNCH | toggle autosynch | Disables the automatic sending of interrupt characters in urgent mode. |
DISABLE BINARY | toggle binary | Disables transmission in binary mode. |
DISABLE CRLF | toggle crlf | Disables the sending of carriage returns as Return LF. |
DISABLE CRMOD | toggle crmod | Disables the mapping of received carriage returns. |
DISABLE DEBUG | toggle netdata | Disables the display of data flow information in hexadecimal. |
DISABLE
LOCAL_CHARS |
toggle localchars | Disables the interpretation of certain control characters by your local TELNET client and passes them to the remote TELNET server. |
DISABLE
OPTIONS_VIEW |
toggle options | Disables the display of option negotiations between the client and server. |
ENABLE AUTOFLUSH | toggle autoflush | Enables the automatic flushing of output when interrupt characters are sent. |
ENABLE AUTOSYNCH | toggle autosynch | Enables the automatic sending of interrupt characters in urgent mode. |
ENABLE BINARY | toggle binary | Enables transmission in binary mode. |
ENABLE CRLF | toggle crlf | Enables the sending of carriage returns as Return LF. |
ENABLE CRMOD | toggle crmod | Enables the mapping of received carriage returns. |
ENABLE DEBUG | toggle netdata | Enables the display of data flow information in hexadecimal. |
ENABLE
LOCAL_CHARS |
toggle localchars | Enables the interpretation of certain control characters by your local TELNET client and prohibits them from being passed to the remote TELNET server. |
ENABLE
OPTIONS_VIEW |
toggle options | Enables the display of option negotiations between the client and server. |
SHOW DEVICE | Displays the current devices. | |
SHOW PARAMETERS | display | Displays the current parameter settings. |
SHOW SESSION | Displays the current sessions. | |
SHOW STATUS | status | Displays the current status. |
SET ECHO | set echo | Sets the echo character to the specified character. |
SET ERASE | set erase | Sets the erase character to the specified character. |
SET ESCAPE | set escape | Sets the escape character to the specified character. |
SET
FLUSHOUTPUT |
set flushoutput | Sets the flush output character to the specified character. |
SET INTERRUPT | set interrupt | Sets the interrupt character to the specified character. |
SET KILL | set kill | Sets the kill character to the specified character. |
SET MODE | mode | Sets the transmission mode to character or line. |
SET QUIT | set quit | Sets the quit character (an alternate interrupt character) to the specified character. |
SET TERMINAL | Sets the terminal type to the specified model. | |
Sending Commands to the Remote Host | ||
SEND AO | send ao | Sends the Abort Output command. |
SEND AYT | send ayt | Sends the Are You There command, testing the path to the remote application and eliciting connection status information from the remote host. |
SEND BRK | send brk | Sends the Break command. |
SEND EC | send ec | Sends the Erase Character command. |
SEND EL | send el | Sends the Erase Line command. |
SEND GA | send ga | Sends the Go Ahead command. |
SEND IP | send ip | Sends the Interrupt character. |
SEND NOP | send nop | Sends the No Operation command to test whether data can be sent to the remote host, eliciting an error if the connection is not open. |
SEND SYNCH | send synch | Sends the Synchronize character. |
Use the following rules when you enter a TELNET command line.
4.1.1 DCL and UNIX Command Formats
With the TELNET command and most of the commands entered at the TELNET prompt, you can use either DCL or UNIX syntax. For example, the following two commands produce the same results:
$ TELNET TELNET> SHOW PARAMETERS |
$ TELNET TELNET> DISPLAY |
Do not include quotation marks on the command line, as shown in the following examples:
$ TELNET CENTRAL |
$ TN3270 CENTRAL |
TELNET> CONNECT CENTRAL |
The following example connects to UNIX host migain and sets a terminal type with the /TERMINAL_TYPE qualifier. No quotation marks are needed to pass a terminal type to migain in lowercase, as demonstrated with the remote host's printenv command.
$ TELNET MIGAIN /TERMINAL_TYPE=vt300 %TELNET-I-Trying, Trying ...11.90.208.56 %TELNET-I-SESSION, Session 01, host migain, port 23 -TELNET-I-Escape, Escape character is '^]' Hello from UNIX host migain login: root Password:... . . . migain# printenv TERM=vt300 HOME=/ SHELL=/bin/csh USER=root PATH=/bin:/usr/bin:/usr/ucb:/etc:/usr/etc:. LOGNAME=root PWD=/ migain# |
You can obtain online help for the TELNET and TN3270 services by entering any of the following commands at the DCL prompt:
$ HELP TELNET $ HELP TN3270 $ HELP TCPIP_SERVICES TELNET |
You can also enter the HELP command at the TELNET prompt:
TELNET> HELP |
You can start a TELNET or TN3270 session with a remote host (also called establishing a connection and opening a connection) in one of the following ways:
The following example shows three ways to establish a connection interactively:
$ TELNET CENTRAL /TERMINAL_TYPE=IBM-3278-2 $ TELNET TELNET> CONNECT CENTRAL 23 VT200 $ TN3270 CENTRAL /TERMINAL_TYPE=IBM-3278-3 |
You can invoke TELNET or TN3270 and, without connecting to a remote host first, enter certain commands that customize the sessions and display parameters or status, as shown in the following example:
$ TELNET TELNET> SHOW STATUS %TELNET-E-NOSESSION, No active session Escape character: '^]' TELNET>SET DEVICE TERMINAL=VT300 TELNET> OPEN GALAXY %TELNET-I-TRYING, Trying ... 1.20.208.10 %TELNET-I-SESSION, Session 01, host galaxy, port 23 -TELNET-I-ESCAPE, Escape character is ^] Compaq Tru64 UNIX (galaxy.udb.com) (ttyp5) login: |
You can end a TELNET or TN3270 session (close the connection) in one of the following ways:
The following example shows two ways to close connections:
% logout %TELNET-S-REMCLOSED, Remote connection closed -TELNET-I-SESSION, Session 01, host galaxy, port 23 TELNET> TELNET> EXIT $ % [Ctrl/]] (characters not echoed) TELNET> DISCONNECT galaxy.udp.com> TELNET> DISCONNECT %TELNET-S-LCLCLOSED, Local connection closed -TELNET-I-SESSION, Session 01, host galaxy, port 23 TELNET> |
To keep a log of your TELNET session, use the /LOG_FILE qualifier. (You cannot use this qualifier with a TN3270 session.)
The following example establishes a TELNET connection to node central , sets the terminal type to VT200, and logs all session output to the file CENT.LOG in your current directory.
$ TELNET/LOG_FILE=CENT.LOG/TERMINAL_TYPE=VT200 CENTRAL |
With DCL command files, you can start TELNET and TN3270 sessions (see
Section 4.6.1) and customize the TELNET/TN3270 environment (see
Section 4.6.2).
4.6.1 Starting TELNET/TN3270
You can create a command procedure containing the DCL commands DEFINE and TELNET (or TN3270) commands.
The following shows an example of a TELNET command procedure:
$! My TELNET startup command file, START_TELNET.COM. $! $! This command procedure establishes a TELNET session $! with UNIX host central. $! $ DEFINE /USER_MODE SYS$INPUT TT: $ TELNET CENTRAL |
You can create initialization command files to customize your TELNET/TN3270 sessions with SET, ENABLE, and DISABLE commands. These command files:
The following example shows a TELNET initialization command procedure:
! This file, TELNETINIT.INI, sets my TELNET parameters ! the way I like them. ! DISABLE AUTOFLUSH ENABLE BINARY ENABLE DEBUG SET DEVICE /TERMINAL=VT300 SET ESCAPE "^p" |
During a session with a remote host, you can toggle between the local TELNET or TN3270 process and the connected host. For example, at the TELNET prompt, you might want to display status, modify a TELNET parameter, or spawn a DCL subprocess.
TELNET> [Return] |
TELNET> RESUME |
TELNET> RESUME n |
TELNET> SET ESCAPE "^escape_character" |
The following example toggles between remote UNIX host biway and the local OpenVMS system.
biway> [Ctrl/]] (characters not echoed) TELNET> SHOW STATUS Session 1 Active Host biway Port 23 Operating Mode: Character-at-a-time Escape character: '^]' Options: Echo - Remote Terminal Type - Local Terminal Type - VT300 Suppress Go Ahead - Local Suppress Go Ahead - Remote Terminal Dataoveruns: 0 Suspended Network I/Os: 0 . . . TELNET> [Return] biway> |
In the next example, user BENTLEY, working at OpenVMS node EAGLE, uses TELNET to do the following:
No current session. |
$ TELNET FERN . . . fern> [Ctrl/]] (characters not echoed) TELNET> SHOW STATUS Session 1 Active Host FERN . . . TELNET> CONNECT GANNET . . . gannet> [Ctrl/]] (characters not echoed) TELNET> SHOW STATUS Session 2 Active Host GANNET Operating Mode: Character-at-a-time Escape character: '^]' . . . Session 1 Waiting Host FERN TELNET> CONNECT SANDS %TELNET-I-Trying, Trying...11.18.222.95 %TELNET-I-SESSION, Session 03, host sands, port 23 -TELNET-I-Escape, Escape character is '^]'. . . . Username: BENTLEY Password: User authorization failure Username: BENTLEY Password: User authorization failure Username: BENTLEY Password: User authorization failure Remote connection closed TELNET> RESUME No current session TELNET> SHOW STATUS Session 1 Waiting Host FERN Session 2 Waiting Host GANNET . . . TELNET> RESUME 2 gannet> [Ctrl/]] (characters not echoed) TELNET> SHOW STATUS Session 2 Active Host GANNET Operating Mode: Character-at-a-time Escape character: '^]' . . . Session 1 Waiting Host FERN TELNET> |
Previous | Next | Contents | Index |