Commit | Line | Data |
---|---|---|
7b089094 WJ |
1 | .\" Copyright (c) 1986, 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
32 | .\" @(#)tn3270.1 4.6 (Berkeley) 7/27/91 | |
33 | .\" | |
34 | .Dd July 27, 1991 | |
35 | .Dt TN3270 1 | |
36 | .Os BSD 4.3 | |
37 | .Sh NAME | |
38 | .Nm tn3270 | |
39 | .Nd full-screen remote login to | |
40 | .Tn IBM VM/CMS | |
41 | .Sh SYNOPSIS | |
42 | .Nm tn3270 | |
43 | .Op Fl d | |
44 | .Op Fl n Ar filename | |
45 | .Op Fl t Ar commandname | |
46 | .Op Ar sysname Op port | |
47 | .Sh DESCRIPTION | |
48 | .Nm Tn3270 | |
49 | permits a full-screen, full-duplex connection | |
50 | from a | |
51 | .Tn UNIX | |
52 | machine | |
53 | to an | |
54 | .Tn IBM | |
55 | (or compatible) machine. | |
56 | .Nm Tn3270 | |
57 | gives the appearance of being logged in | |
58 | to the remote machine | |
59 | from an | |
60 | .Tn IBM | |
61 | 3270 terminal. | |
62 | Of course, you must have an account on the machine | |
63 | to which you connect in order to log in. | |
64 | .Nm Tn3270 | |
65 | looks to the user in many respects | |
66 | like the Yale | |
67 | .Tn ASCII | |
68 | Terminal Communication System II. | |
69 | .Nm Tn3270 | |
70 | is actually a modification of the Arpanet | |
71 | .Tn TELNET | |
72 | user interface (see | |
73 | .Xr telnet 1 ) | |
74 | which will, in certain circumstances, interpret and generate | |
75 | raw 3270 control streams. | |
76 | .Pp | |
77 | The flags to | |
78 | .Nm tn3270 | |
79 | are as follows: | |
80 | .Bl -tag -width Fl | |
81 | .It Fl d | |
82 | Turn on socket-level tracing (for super-user only) | |
83 | .Fl n Ns Ar filename | |
84 | Specify a file to receive network trace data | |
85 | output (from commands "toggle netdata" and | |
86 | "toggle options", see | |
87 | .Xr telnet 1 ) ; | |
88 | the default is for output | |
89 | to be directed to the standard error file. | |
90 | .Fl t Ns Ar commandname | |
91 | Specify a | |
92 | .Tn UNIX | |
93 | command to process | |
94 | .Tn IBM | |
95 | 4994 style transparent mode | |
96 | data received from the remote | |
97 | .Tn IBM | |
98 | machine. | |
99 | .It Ar sysname | |
100 | The name of the remote system. If the remote name | |
101 | is NOT specified, the user will be prompted for a | |
102 | command (see below). | |
103 | .It Ar port | |
104 | The port to connect to on the remote system. | |
105 | Normally, | |
106 | .Nm tn3270 | |
107 | attempts to connect to the | |
108 | standard | |
109 | .Tn TELNET | |
110 | port (port | |
111 | 23) on the remote machine. | |
112 | .El | |
113 | .Pp | |
114 | When | |
115 | .Nm tn3270 | |
116 | first connects to the remote system, it will negotiate to go into | |
117 | 3270 mode. | |
118 | Part of this negotiation involves telling the remote system what model | |
119 | 3270 it is emulating. | |
120 | In all cases, | |
121 | .Nm tn3270 | |
122 | emulates a 3278 terminal. | |
123 | To decide which specific model, | |
124 | .Nm tn3270 | |
125 | looks at the number of lines and columns on the actual terminal (as | |
126 | defined in the | |
127 | .Ev TERM | |
128 | environment variable; see | |
129 | .Xr termcap 5 ) . | |
130 | The terminal (or window in which | |
131 | .Nm tn3270 | |
132 | is running, on multiple | |
133 | window systems) must have at least 80 columns and 24 lines, or | |
134 | .Nm tn3270 | |
135 | will not go into emulation mode. | |
136 | If the terminal does have at least 80 columns and at least 24 lines, | |
137 | the following table describes the emulation: | |
138 | .Pp | |
139 | .ne 7v | |
140 | .Bd -filled -offset center | |
141 | .Bl -column (rows*columns) | |
142 | .It minimum_size emulated | |
143 | .It (rows*columns) terminal | |
144 | .It -------------- ------------ | |
145 | .It 27*132 3278 model 5 | |
146 | .It 43*80 3278 model 4 | |
147 | .It 32*80 3278 model 3 | |
148 | .It 24*80 3278 model 2. | |
149 | .El | |
150 | .Ed | |
151 | .Pp | |
152 | Emulation of the 3270 terminal is done in the | |
153 | .Tn UNIX | |
154 | process. | |
155 | This emulation involves mapping | |
156 | 3270-style commands from the host | |
157 | into appropriate sequences to control the user's terminal screen. | |
158 | .Nm Tn3270 | |
159 | uses | |
160 | .Xr curses 3 | |
161 | and the | |
162 | .Pa /usr/share/misc/termcap | |
163 | file to do this. | |
164 | The emulation also involves simulating the special 3270 keyboard keys | |
165 | (program function keys, etc.) | |
166 | by mapping sequences of keystrokes | |
167 | from the | |
168 | .Tn ASCII | |
169 | keyboard into appropriate 3270 control strings. | |
170 | This mapping is terminal dependent and is specified | |
171 | in a description file, | |
172 | .Pa /usr/share/misc/map3270 , | |
173 | (see | |
174 | .Xr map3270 5 ) | |
175 | or in an environment variable | |
176 | .Ev MAP3270 | |
177 | (and, if necessary, | |
178 | .Ev MAP3270A , | |
179 | .Ev MAP3270B , | |
180 | and so on - see | |
181 | .Xr mset 1 ) . | |
182 | Any special function keys on the | |
183 | .Tn ASCII | |
184 | keyboard are used whenever possible. | |
185 | If an entry for the user's terminal | |
186 | is not found, | |
187 | .Nm tn3270 | |
188 | looks for an entry for the terminal type | |
189 | .Em unknown . | |
190 | If this is not found, | |
191 | .Nm tn3270 | |
192 | uses a default keyboard mapping | |
193 | (see | |
194 | .Xr map3270 5 ) . | |
195 | .Pp | |
196 | The first character of each special keyboard mapping sequence | |
197 | is either an | |
198 | .Tn ASCII | |
199 | escape | |
200 | .Pq Tn ESC , | |
201 | a control character, or an | |
202 | .Tn ASCII | |
203 | delete | |
204 | .Pq Tn DEL . | |
205 | If the user types an unrecognized function key sequence, | |
206 | .Nm tn3270 | |
207 | sends an | |
208 | .Tn ASCII | |
209 | bell | |
210 | .Pq Tn BEL , | |
211 | or a visual bell if | |
212 | defined in the user's termcap entry, to the user's terminal | |
213 | and nothing is sent to the | |
214 | .Tn IBM | |
215 | host. | |
216 | .Pp | |
217 | If | |
218 | .Nm tn3270 | |
219 | is invoked without specifying a remote host system name, | |
220 | it enters local command mode, | |
221 | indicated by the prompt | |
222 | .Dq Li tn3270>\ . | |
223 | In this mode, | |
224 | .Nm tn3270 | |
225 | accepts and executes | |
226 | all the commands of | |
227 | .Xr telnet 1 , | |
228 | plus one additional command: | |
229 | .Pp | |
230 | .Bl -tag -width Ar | |
231 | .It Ic transcom | |
232 | Specify | |
233 | .Tn UNIX | |
234 | command for | |
235 | .Tn IBM | |
236 | 4994 style transparent mode processing. | |
237 | .El | |
238 | .Pp | |
239 | .Nm Tn3270 | |
240 | command mode may also be entered, after connecting to a host, by typing | |
241 | a special escape sequence. | |
242 | If | |
243 | .Nm tn3270 | |
244 | has succeeded in negotiating 3270 mode with the remote host, the | |
245 | escape sequence will be as defined by the map3270 (see | |
246 | .Xr map3270 5 ) | |
247 | entry for the user's terminal type | |
248 | (typically control-C); | |
249 | otherwise the escape sequence will initially be set to the | |
250 | single character | |
251 | .Sq Li \&^] | |
252 | (control right square bracket). | |
253 | .Pp | |
254 | While in command mode, any host login session is still alive | |
255 | but temporarily suspended. | |
256 | The host login session may be resumed by entering an empty line | |
257 | (press the | |
258 | .Tn RETURN | |
259 | key) | |
260 | in response to the command prompt. | |
261 | A session may be terminated by logging off the foreign host, | |
262 | or by typing ``quit'' or ``close'' while in local command mode. | |
263 | .Sh FILES | |
264 | .Bl -tag -width /usr/share/misc/termcap -compact | |
265 | .It Pa /usr/share/misc/termcap | |
266 | .It Pa /usr/share/misc/map3270 | |
267 | .El | |
268 | .\" .Sh AUTHOR | |
269 | .\" Greg Minshall | |
270 | .Sh NOTES | |
271 | The | |
272 | .Tn IBM | |
273 | 4994 style transparent mode command is invoked when | |
274 | .Nm tn3270 | |
275 | receives | |
276 | .Tn IBM | |
277 | 4994 style transparent output from the remote host. | |
278 | Output and input pipes are created for communication between the two | |
279 | processes. | |
280 | The pipes are closed when a 3270 clear command is received from the remote | |
281 | hosts, signalling the end of transparent mode output. | |
282 | Transparent mode is necessary for sending | |
283 | .Tn ASCII | |
284 | control characters over the | |
285 | 3270 terminal connection; | |
286 | .Tn ASCII | |
287 | graphics terminal support is accomplished this | |
288 | way. | |
289 | Developers of | |
290 | .Ic transcom | |
291 | commands should note that the | |
292 | .Ic transcom | |
293 | stdin pipe end will be in | |
294 | .Dv CBREAK | |
295 | mode, with | |
296 | .Dv ECHO | |
297 | and | |
298 | .Dv CRMOD | |
299 | turned off. | |
300 | .Sh ENVIRONMENT | |
301 | .Nm Tn3270 | |
302 | checks the following environment variables: | |
303 | .Ev TERM , | |
304 | .Ev MAP3270 , | |
305 | .Ev MAP3270[A...] . | |
306 | Information on these can be found in | |
307 | .Xr mset 1 . | |
308 | .Nm Tn3270 | |
309 | also checks | |
310 | .Ev SHELL , | |
311 | .Ev KEYBD | |
312 | and | |
313 | .Ev API3270 . | |
314 | .Sh SEE ALSO | |
315 | .Xr mset 1 , | |
316 | .Xr telnet 1 , | |
317 | .Xr curses 3 , | |
318 | .Xr termcap 3 , | |
319 | .Xr termcap 5 , | |
320 | .Xr map3270 5 , | |
321 | .Rs | |
322 | .%T "Yale ASCII Terminal Communication" | |
323 | .%B "System II Program Description/Operator's Manual" | |
324 | .%R IBM SB30-1911 | |
325 | .Re | |
326 | .Sh HISTORY | |
327 | The | |
328 | .Nm tn3270 | |
329 | command appeared in | |
330 | .Bx 4.3 . | |
331 | .Sh BUGS | |
332 | Tn3270 is slow and uses system resources prodigiously. | |
333 | .Pp | |
334 | Not all 3270 functions are supported, | |
335 | nor all Yale enhancements. | |
336 | .Pp | |
337 | Error conditions (attempting to enter data in a protected field, for | |
338 | example) should cause a message to be sent to the user's terminal | |
339 | instead of just ringing a bell. |