1x3270(1) General Commands Manual x3270(1)
2
3
4
6 x3270 - IBM host access tool
7
9 x3270 [options] [host]
10
11 x3270 [options] session-file.x3270
12
13
15 x3270 opens a telnet connection to an IBM host in an X window. It
16 implements RFCs 2355 (TN3270E), 1576 (TN3270) and 1646 (LU name selec‐
17 tion), and supports IND$FILE file transfer. The window created by
18 x3270 can use its own font for displaying characters, so it is a fairly
19 accurate representation of an IBM 3278 or 3279. It is similar to
20 tn3270(1) except that it is X-based, not curses-based. The full syntax
21 for host is:
22 [prefix:]...[LUname@]hostname[:port][=accept]
23
24 Prepending a P: onto hostname causes the connection to go through the
25 telnet-passthru service rather than directly to the host. See PASSTHRU
26 below.
27
28 Prepending an S: onto hostname removes the "extended data stream"
29 option reported to the host. See -tn below for further information.
30
31 Prepending an N: onto hostname turns off TN3270E support for the ses‐
32 sion.
33
34 Prepending an L: onto hostname causes x3270 to first create an SSL/TLS
35 tunnel to the host, and then create a TN3270 session inside the tunnel.
36 (This function is supported only if x3270 was built with SSL/TLS sup‐
37 port). Note that TLS-encrypted sessions using the TELNET START-TLS
38 option are negotiated with the host automatically; for these sessions
39 the L: prefix should not be used.
40
41 Prepending a Y: onto hostname causes x3270 to skip validation of host
42 SSL/TLS certificates. This overrides any other configuration or com‐
43 mand-line options.
44
45 Prepending an A: onto hostname is equivalent to setting the -nvt
46 option; it forces an NVT-mode session instead of a 3270-mode session.
47
48 A specific Logical Unit (LU) name to use may be specified by prepending
49 it to the hostname with an `@'. Multiple LU names to try can be sepa‐
50 rated by commas. An empty LU can be placed in the list with an extra
51 comma. (Note that the LU name is used for different purposes by dif‐
52 ferent kinds of hosts. For example, CICS uses the LU name as the Ter‐
53 minal ID.)
54
55 The hostname may optionally be placed inside square-bracket characters
56 `[' and `]'. This will prevent any colon `:' characters in the host‐
57 name from being interpreted as indicating option prefixes or port num‐
58 bers. This allows numeric IPv6 addresses to be used as hostnames.
59
60 On systems that support the forkpty library call, the hostname may be
61 replaced with -e and a command string. This will cause x3270 to con‐
62 nect to a local child process, such as a shell.
63
64 The port to connect to defaults to telnet. This can be overridden with
65 the -port option, or by appending a port to the hostname with a colon
66 `:'. (For compatability with previous versions of x3270 and with
67 tn3270(1), the port may also be specified as a second, separate argu‐
68 ment.)
69
70 An optional accept name (a hostname to accept in the host's SSL/TLS
71 certificate) may be specified by appending it to the hostname with an
72 equals sign (`='). The accept name can also be specified with the
73 -accepthostname option.
74
75
77 x3270 is a toolkit based program, so it understands standard Xt options
78 and resources. It also understands the following options:
79
80 -accepthostname name
81 Specifies a particular hostname to accept when validating the
82 name presented in the server SSL certificate, instead of compar‐
83 ing to the name used to make the connection.
84
85 -activeicon
86 Specifies that the icon should be a miniature version of the
87 screen image. See ICONS below.
88
89 -apl Sets up APL mode. This is actually an abbreviation for several
90 options. See APL SUPPORT below.
91
92 -cadir directory
93 Specifies a directory containing CA (root) certificates to use
94 when verifying a certificate provided by the host. (OpenSSL
95 only)
96
97 -cafile filename
98 Specifies a PEM-format file containing CA (root) certificates to
99 use when verifying a certificate provided by the host. (OpenSSL
100 only)
101
102 -cc range:value[,...]
103 Sets character classes.
104
105 -certfile filename
106 Specifies a file containing a client certificate to provide to
107 the host. The default file type is PEM.
108
109 -clientcert name
110 Specifies the name of a client certificate to provide to the
111 host. (MacOS only)
112
113 -certfiletype type
114 Specifies the type of the certificate file specified by -cert‐
115 file. Type can be pem or asn1. (OpenSSL only)
116
117 -chainfile filename
118 Specifies a certificate chain file in PEM format, containing a
119 certificate to provide to the host, as well as one or more
120 intermediate certificates and the CA certificate used to sign
121 that certificate. If -chainfile is specified, it overrides
122 -certfile. (OpenSSL only)
123
124 -charset name
125 Specifies an EBCDIC host character set.
126
127 -clear toggle
128 Sets the initial value of toggle to false.
129
130 -connecttimeout seconds
131 Specifies the time that x3270 will wait for a host connection to
132 complete.
133
134 -devname name
135 Specifies a device name (workstation ID) for RFC 4777 support.
136
137 -efont name
138 Specifies a font for the emulator window.
139
140 -hostsfile file
141 Uses file as the hosts file, which allows aliases for host names
142 and scripts to be executed at login. See ibm_hosts(1) for
143 details.
144
145 -httpd [addr:]port
146 Specifies a port and optional address to listen on for HTTP con‐
147 nections. Addr can be specified as `*' to indicate 0.0.0.0; the
148 default is 127.0.0.1. IPv6 numeric addresses must be specified
149 inside of square brackets, e.g., [::1]:4080 to specify the IPv6
150 loopback address and TCP port 4080.
151
152 Note that this option is mutually-exclusive with the -scriptport
153 option
154
155 -iconname name
156 Specifies an alternate title for the program icon.
157
158 -iconx x
159 Specifies the initial x coordinate for the program icon.
160
161 -icony y
162 Specifies the initial y coordinate for the program icon.
163
164 -im method
165 Specifies the name of the input method to use for multi-byte
166 input. (Supported only when x3270 is compiled with DBCS sup‐
167 port.)
168
169 -keyfile filename
170 Specifies a file containing the private key for the certificate
171 file (specified via -certfile or -chainfile). The default file
172 type is PEM. (OpenSSL only)
173
174 -keyfiletype type
175 Specifies the type of the private key file specified by -key‐
176 file. Type can be pem or asn1. (OpenSSL only)
177
178 -keypasswd type:value
179 Specifies the password for the private key file (OpenSSL) or
180 client certificate file (MacOS), if it is encrypted. The argu‐
181 ment can be file:filename, specifying that the password is in a
182 file, or string:string, specifying the password on the command-
183 line directly. If the private key file is encrypted and no
184 -keypasswd option is given, the password will be prompted for
185 interactively.
186
187 -keymap name
188 Specifies a keymap name and optional modifiers. See KEYMAPS
189 below.
190
191 -keypad
192 Turns on the keypad as soon as x3270 starts.
193
194 -km name
195 Specifies the local encoding method for multi-byte text. name
196 is an encoding name recognized by the ICU library. (Supported
197 only when x3270 is compiled with DBCS support, and necessary
198 only when x3270 cannot figure it out from the locale.)
199
200 -loginmacro Action(arg...) ...
201 Specifies a macro to run at login time.
202
203 -model name
204 The model of 3270 display to be emulated. The model name is in
205 two parts, either of which may be omitted:
206
207 The first part is the base model, which is either 3278 or 3279.
208 3278 specifies a monochrome (green on black) 3270 display; 3279
209 specifies a color 3270 display.
210
211 The second part is the model number, which specifies the number
212 of rows and columns. Model 4 is the default.
213
214 Model Number Columns Rows
215 ──────────────────────────────
216 2 80 24
217 3 80 32
218 4 80 43
219 5 132 27
220
221 Note: Technically, there is no such 3270 display as a 3279-4 or
222 3279-5, but most hosts seem to work with them anyway.
223
224 The default model for a color X display is 3279-4. For a
225 monochrome X display, it is 3278-4.
226
227 -mono Forces x3270 to believe it is running on a monochrome X display.
228
229 -noverifycert
230 For SSL/TLS connections, do not verify the host certificate.
231
232 -nvt Start in NVT mode instead of waiting for the host to send data,
233 and make the default terminal type xterm.
234
235 -once Causes x3270 to exit after a host disconnects. This option has
236 effect only if a hostname is specified on the command line.
237
238 -oversize colsxrows
239 Makes the screen larger than the default for the chosen model
240 number. This option has effect only in combination with
241 extended data stream support (controlled by the "x3270.extended"
242 resource), and only if the host supports the Query Reply
243 structured field. The number of columns multiplied by the
244 number of rows must not exceed 16383 (3fff hex), the limit of
245 14-bit 3270 buffer addressing.
246
247 -port n
248 Specifies a different TCP port to connect to. n can be a name
249 from /etc/services like telnet, or a number. This option
250 changes the default port number used for all connections. (The
251 positional parameter affects only the initial connection.)
252
253 -printerlu luname
254 Causes x3270 to automatically start a pr3287 printer session.
255 If luname is ".", then the printer session will be associated
256 with the interactive terminal session (this requires that the
257 host support TN3270E). Otherwise, the value is used as the
258 explicit LU name to associate with the printer session.
259
260 -proxy type:host[:port]
261 Causes x3270 to connect via the specified proxy, instead of
262 using a direct connection. The host can be an IP address or
263 hostname. The optional port can be a number or a service name.
264 For a list of supported proxy types, see PROXY below.
265
266 -pt type
267 Specifies the preedit type for the multi-byte input method.
268 Valid values are OverTheSpot, OffTheSpot, Root and OnTheSpot.
269 The value for OverTheSpot can include an optional suffix, a
270 signed number indicating the vertical distance in rows of the
271 preedit window from the cursor position, e.g. OverTheSpot+1 or
272 OverTheSpot-2. The default value is OverTheSpot+1. (Supported
273 only when x3270 is compiled with DBCS support.)
274
275 -reconnect
276 Causes x3270 to automatically reconnect to the host if it ever
277 disconnects. This option has effect only if a hostname is
278 specified on the command line.
279
280 -sb Turns on the scrollbar.
281
282 +sb Turns the scrollbar off.
283
284 -scheme name
285 Specifes a color scheme to use in 3279 mode. This option has
286 effect only in combination with 3279 emulation.
287
288 -script
289 Causes x3270 to read commands from standard input, with the
290 results written to standard output. The protocol for these
291 commands is documented in x3270-script(1).
292
293 -sl n Specifies that n lines should be saved for scrolling back. The
294 default is 4096.
295
296 -scriptport [addr:]port
297 Specifies a port and optional address to listen on for scripting
298 connections. Addr can be specified as `*' to indicate 0.0.0.0;
299 the default is 127.0.0.1. IPv6 numeric addresses must be
300 specified inside of square brackets, e.g., [::1]:4081 to specify
301 the IPv6 loopback address and TCP port 4081.
302
303 Note that this option is mutually-exclusive with the -httpd
304 option
305
306 -scriptportonce
307 Allows x3270 to accept only one script connection. When that
308 connection is broken, x3270 will exit.
309
310 -secure
311 Disables run-time features that could compromise system security
312 (user-specified file names and commands, etc.).
313
314 -set toggle
315 Sets the initial value of toggle to true.
316
317 -socket
318 Causes the emulator to create a Unix-domain socket when it
319 starts, for use by script processes to send commands to the
320 emulator. The socket is named /tmp/x3sck.pid. The -p option of
321 x3270if causes it to use this socket, instead of pipes specified
322 by environment variables.
323
324 -tn name
325 Specifies the terminal name to be transmitted over the telnet
326 connection. The default name is IBM-model_name-E, for example,
327 IBM-3279-4-E for a color X display, or IBM-3278-4-E for a
328 monochrome X display.
329
330 Some hosts are confused by the -E suffix on the terminal name,
331 and will ignore the extra screen area on models 3, 4 and 5.
332 Prepending an s: on the hostname, or setting the
333 "x3270.extended" resource to "false", removes the -E from the
334 terminal name when connecting to such hosts.
335
336 The name can also be specified with the "x3270.termName"
337 resource.
338
339 -trace Turns on data stream tracing at startup. Unlike turning it on
340 from a menu option, there is no pop-up to confirm the file name,
341 which defaults to /tmp/x3trc.
342
343 -tracefile file
344 Specifies a file to save data stream and event traces into. If
345 the name starts with `>>', data will be appended to the file.
346 If the value stdout is given, then traces will be written to
347 standard output. If the value none is given, then traces will
348 be piped directly to the monitor window, and no file will be
349 created.
350
351 -tracefilesize size
352 Places a limit on the size of a trace file. If this option is
353 not specified, or is specified as 0 or none, the trace file size
354 will be unlimited. The minimum size is 64 Kbytes. The value of
355 size can have a K or M suffix, indicating kilobytes or megabytes
356 respectively. When the trace file reaches the size limit, it
357 will be renamed with a `-' appended and a new file started.
358
359 -user name
360 Specifies the user name for RFC 4777 support.
361
362 -v Display the version and build options for x3270 and exit.
363
364 -verifycert
365 For SSL/TLS connections, verify the host certificate, and do not
366 allow the connection to complete unless it can be validated.
367 (This is the default setting.) This option is overridden by a
368 y: prepended to the hostname when connecting.
369
370 After reading resource definitions from the X server and any
371 standandard X11 resource definition files ($HOME/.Xdefaults, etc.),
372 x3270 will read definitions from the file $HOME/.x3270pro. This file
373 contains local customizations and is also used to save changed options
374 by the Save Changed Options in File menu option.
375
376 Note that -xrm options override any definitions in the .x3270pro file.
377
379 The x3270 status line contains a variety of information. From left to
380 right, the fields are:
381
382 comm status
383 The first symbol is always a 4. If x3270 is in TN3270E mode,
384 the second symbol is a B; otherwise it is an A. If x3270 is
385 disconnected, the third symbol is a question mark. Otherwise,
386 if x3270 is in SSCP-LU mode, the third symbol is an S.
387 Otherwise it is blank.
388
389 keyboard lock
390 If the keyboard is locked, an "X" symbol and a message field
391 indicate the reason for the keyboard lock.
392
393 shift Three characters indicate the keyboard modifier status. "M"
394 indicates the Meta key, "A" the Alt key, and an up-arrow or "^"
395 indicates the Shift key.
396
397 compose
398 The letter "C" indicates that a composite character is in
399 progress. If another symbol follows the "C", it is the first
400 character of the composite.
401
402 typeahead
403 The letter "T" indicates that one or more keystrokes are in the
404 typeahead buffer.
405
406 temporary keymap
407 The letter "K" indicates that a temporary keymap is in effect.
408
409 reverse
410 The letter "R" indicates that the keyboard is in reverse field
411 entry mode.
412
413 insert mode
414 A thick caret "^" or the letter "I" indicates that the keyboard
415 is in insert mode.
416
417 printer session
418 The letter "P" indicates that a pr3287 session is active.
419
420 script The letter "S" indicates that a script is active.
421
422 LU name
423 The LU name associated with the session, if there is one.
424
425 timing A clock symbol and a time in seconds indicate the time it took
426 to process the last AID or the time to connect to a host. This
427 display is optional.
428
429 cursor position
430 The cursor row and column are optionally displayed, zero padded
431 and separated by a "/". Location 001/001 is at the upper left,
432 which is different from the row and columns parameters used with
433 various actions, where the upper left corner is row 0, column 0.
434
436 If the -activeicon option is given (or the "x3270.activeIcon" resource
437 is set to true), x3270 will attempt to make its icon a miniature
438 version of the current screen image. This function is highly dependent
439 on your window manager:
440
441 mwm The size of the icon is limited by the "Mwm.iconImageMaximum"
442 resource, which defaults to 50x50. The image will be clipped at
443 the bottom and right. The icon cannot accept keyboard input.
444
445 olwm The full screen image of all 3270 models can be displayed on the
446 icon. However, the icon cannot be resized, so if the model is
447 later changed with an x3270 menu option, the icon image will be
448 corrupted. The icon cannot accept keyboard input.
449
450 twm and tvtwm
451 The full screen image of all 3270 models can be displayed on the
452 icon, and the icon can be resized. The icon can accept keyboard
453 input.
454
455 However, twm does not put labels on application-supplied icon
456 windows. You can have x3270 add its own label to the icon by
457 setting the "x3270.labelIcon" resource to true. The default
458 font for icon labels is 8x13; you may change it with the
459 "x3270.iconLabelFont" resource.
460
462 The type of keyboard may be specified with the -keymap switch or using
463 either the KEYMAP or KEYBD environment variables. The types of
464 supported keyboards include sun_k3, sun_k4, sun_k5, hp-k1, hp-pc and
465 ncd.
466
467 The keymap may also be specified as a comma-separated list of names.
468 Later definitions override earlier ones. This is used to specify both
469 a primary keyboard type and a set of modifiers. The modifiers defined
470 include:
471
472 ow (OpenWindows) Swaps the middle and right mouse button
473 definitions, so the middle button performs the "Extend" function
474 and the right-hand button performs the "Paste" function. Also
475 changes the cut and paste actions to use the OpenWindows
476 CLIPBOARD.
477
478 apl Allows entry of APL characters (see APL SUPPORT below).
479
480 finnish7
481 Replaces the bracket, brace and bar keys with common Finnish
482 characters.
483
484 norwegian7
485 Replaces the bracket, brace and bar keys with common Norwegian
486 characters.
487
488 A temporary keymap can also be specified while x3270 is running with
489 the Keymap action. When the action Keymap(n) is executed, temporary
490 keymap n is added to or deleted from the current keymap. Multiple
491 temporary keymaps can be active simultaneously. The action
492 Keymap(None) restores the original keymap. Note: When Keymap() is
493 specified as part of a list of multiple actions in a keymap, it must be
494 the last action in the list.
495
496 The temporary keymap hebrew is provided to allow entry of Hebrew
497 characters.
498
499 The X Toolkit translation mechanism is used to provide keyboard
500 emulation. It maps events into actions. The best documentation can be
501 found with X toolkit documents, but the following should suffice for
502 simple customization.
503
504 An Xt event consists of (at least) four fields. The first is called a
505 modifier. It may be any combination of Meta, Shift and Ctrl. If it is
506 prefaced by !, it means those modifiers only. The second field is the
507 specific event, in x3270 usually just <Key>. The third field is the
508 detail field, which gives the actual key. The name of the key may be
509 determined using the xev program or with the "Trace X Events" menu
510 option. The last field is the action, which is the internal emulator
511 function. A complete list of actions may be found later in the manual.
512
513 There are three levels of translation tables in x3270. The first is a
514 defined by the resource x3270.keymap.base. It defines alphabetic,
515 numeric, function keys, and such basic functions as Enter and Delete.
516 It allows a minimal useful functionality. It is generally compiled in
517 x3270, but can be overridden.
518
519 The second level is a keyboard specific table, which is selected by the
520 x3270.keymap resource, and defined by the x3270.keymap.name resource
521 (where name is the value of the x3270.keymap resource). This keymap
522 defines actions for such things as keypad keys, and keys unique to
523 certain keyboards. Several predefined keymaps are included with x3270.
524
525 The third level is a user customizable table which may be used to
526 augment or override key definitions. This keymap is defined by the
527 x3270.keymap.name.user resource.
528
529 In addition, keymaps may be defined for use in 3270 mode or NVT mode
530 only. These keymaps use the suffixes .3270 and .nvt in their names,
531 respectively. If a keymap x3270.keymap.name.mode is defined, it will
532 augment the keymap x3270.keymap.name when x3270 is in the given mode.
533 If a keymap x3270.keymap.name.user.mode is defined, it will augment the
534 keymap x3270.keymap.name.user when x3270 is in the given mode.
535
536 The default translation table x3270.keymap.base is:
537
538 <Key>Multi_key Compose()
539 Shift<Key>Left KybdSelect(Left,PRIMARY)
540 <Key>Left Left()
541 Meta<Key>Right NextWord()
542 Shift<Key>Right KybdSelect(Right,PRIMARY)
543 <Key>Right Right()
544 Shift<Key>Up KybdSelect(Up,PRIMARY)
545 <Key>Up Up()
546 Shift<Key>Down KybdSelect(Down,PRIMARY)
547 <Key>Down Down()
548 Ctrl<Btn1Down> HandleMenu(quitMenu)
549 Ctrl<Btn2Down> HandleMenu(optionsMenu)
550 Ctrl<Btn3Down> HandleMenu(hostMenu)
551 Shift<Btn1Down> MoveCursor()
552 <Btn1Down> select-start()
553 <Btn1Motion> select-extend()
554 <Btn2Down> ignore()
555 <Btn2Motion> ignore()
556 <Btn2Up> insert-selection(PRIMARY)
557 <Btn3Down> start-extend()
558 <Btn3Motion> select-extend()
559 <BtnUp> select-end(PRIMARY)
560 Meta<Key>F1 PF(13)
561 Shift<Key>F1 PF(13)
562 Meta<Key>F2 PF(14)
563 Shift<Key>F2 PF(14)
564 Meta<Key>F3 PF(15)
565 Shift<Key>F3 PF(15)
566 Meta<Key>F4 PF(16)
567 Shift<Key>F4 PF(16)
568 Meta<Key>F5 PF(17)
569 Shift<Key>F5 PF(17)
570 Meta<Key>F6 PF(18)
571 Shift<Key>F6 PF(18)
572 Meta<Key>F7 PF(19)
573 Shift<Key>F7 PF(19)
574 Meta<Key>F8 PF(20)
575 Shift<Key>F8 PF(20)
576 Meta<Key>F9 PF(21)
577 Shift<Key>F9 PF(21)
578 Meta<Key>F10 PF(22)
579 Shift<Key>F10 PF(22)
580 Meta<Key>F11 PF(23)
581 Shift<Key>F11 PF(23)
582 Meta<Key>F12 PF(24)
583 Shift<Key>F12 PF(24)
584 <Key>F1 PF(1)
585 <Key>F2 PF(2)
586 <Key>F3 PF(3)
587 <Key>F4 PF(4)
588 <Key>F5 PF(5)
589 <Key>F6 PF(6)
590 <Key>F7 PF(7)
591 <Key>F8 PF(8)
592 <Key>F9 PF(9)
593 <Key>F10 PF(10)
594 <Key>F11 PF(11)
595 <Key>F12 PF(12)
596 Alt<Key>q Quit()
597 <Key>Prior Scroll(Backward)
598 <Key>Next Scroll(Forward)
599 :<Key> Default()
600
601 The default 3270-mode table x3270.keymap.base.3270 adds the following
602 definitions:
603
604 Shift<Key>Return Newline()
605 <Key>Return Enter()
606 <Key>Linefeed Newline()
607 Shift<Key>Tab BackTab()
608 <Key>Tab Tab()
609 <Key>Home Home()
610 Meta<Key>Left PreviousWord()
611 Meta<Key>Right NextWord()
612 <Key>Insert Insert()
613 <Key>Delete Delete()
614 <Key>BackSpace BackSpace()
615 Ctrl Shift<Btn1Down> MouseSelect()
616 Shift<Btn1Down> MoveCursor()
617 Meta<Key>1 PA(1)
618 Meta<Key>2 PA(2)
619 Meta<Key>3 PA(3)
620 Ctrl<Key>a SelectAll(PRIMARY)
621 Meta<Key>a Attn()
622 Meta<Key>b PrintWindow()
623 Ctrl<Key>c set-select(CLIPBOARD)
624 Meta<Key>c Clear()
625 Meta<Key>d Delete()
626 Meta<Key>e EraseEOF()
627 Meta<Key>f Flip()
628 Meta<Key>h Home()
629 Meta<Key>i Insert()
630 Meta<Key>l Redraw()
631 Meta<Key>p PrintText()
632 Meta<Key>r Reset()
633 Meta<Key>u Unselect()
634 Ctrl<Key>u DeleteField()
635 Ctrl<Key>v insert-
636 selection(CLIPBOARD)
637 Meta<Key>v ToggleReverse()
638 Ctrl<Key>w DeleteWord()
639 Ctrl<Key>x Cut(CLIPBOARD)
640
641 Meta is the diamond shaped key on a sun_k4, "Alt" on an NCD, "Extend
642 Char" on an HP. The following xmodmap command must be used on the NCD
643 to allow use the the "Alt" key:
644
645 xmodmap -e "keysym Alt_L = Meta_L"
646
647 The left mouse button may be used to make a selection. Clicking once
648 unselects the current selection. Clicking twice selects the word under
649 the mouse cursor. Clicking three times selects the line under the
650 mouse cursor. Clicking and dragging selects a rectangular area of the
651 display.
652
653 The middle mouse button may be used to paste a selection.
654
655 The right mouse button may also be used for selections, selecting the
656 rectangular area between the current position and where the left button
657 was last pressed.
658
659 On color X displays, the "x3270.selectBackground" resource is used to
660 distinguish the selected text from the rest of the screen. On
661 monochrome X displays, selected text is in reverse video. (It can be
662 distinguished from a block cursor because the block cursor covers
663 slightly less than an entire character position on the screen.)
664
665 The left mouse button, when pressed with the "Shift" key held down,
666 moves the 3270 cursor to the where the mouse cursor is pointing.
667
668 This is the complete list of keymap-callable actions. Other actions
669 are defined for use by scripts and are documented in x3270-script(1);
670 still others are defined for internal use by x3270 and are not
671 documented here. Note that when an action with no parameters is used
672 in a keymap, the parentheses and empty argument list are still
673 required.
674
675 ).PP Actions marked with an asterisk (*) may block, sending data to the
676 host and possibly waiting for a response.
677
678 *Attn attention key
679 AltCursor switch between block and
680 underscore cursor
681 BackSpace move cursor left (or send
682 ASCII BS)
683 BackTab tab to start of previous input
684 field
685 CircumNot input "^" in NVT mode, or
686 "notsign" in 3270 mode
687 *Clear clear screen
688 Compose next two keys form a special
689 symbol
690 *Connect(host) connect to host
691 *CursorSelect Cursor Select AID
692 Cut copy highlighted area to
693 clipboard and erase
694 Default enter key literally
695 Delete delete character under cursor
696 (or send ASCII DEL)
697 DeleteField delete the entire field
698 DeleteWord delete the current or previous
699 word
700 *Disconnect disconnect from host
701 Down move cursor down
702 Dup duplicate field
703 *Enter Enter AID (or send ASCII CR)
704 Erase erase previous character (or
705 send ASCII BS)
706 EraseEOF erase to end of current field
707 EraseInput erase all input fields
708 Execute(cmd) execute a command in a shell
709 FieldEnd move cursor to end of field
710 FieldMark mark field
711 HandleMenu(name) pop up a menu
712 HexString(hex_digits) insert control-character
713 string
714 Home move cursor to first input
715 field
716 Insert set insert mode
717 *Interrupt send TELNET IP to host
718 Key(keysym) insert key keysym
719 Key(0xxx) insert key with character code
720 xx
721 Keymap(keymap) toggle alternate keymap (or
722 remove with None)
723 KybdSelect(direction Extend selection by one row or
724 [,atom...]) column
725 Left move cursor left
726 Left2 move cursor left 2 positions
727 *Macro(macro) run a macro
728 MonoCase toggle uppercase-only mode
729 MoveCursor move cursor to mouse position
730 MoveCursor(row, col) move cursor to zero-origin
731 (row,col)
732 *MoveCursorSelect move cursor to mouse position,
733 light pen selection
734 Newline move cursor to first field on
735 next line (or send ASCII LF)
736 NextWord move cursor to next word
737 *PA(n) Program Attention AID (n from
738 1 to 3)
739
740 *PF(n) Program Function AID (n from 1
741 to 24)
742 PreviousWord move cursor to previous word
743 Printer(Start[,lu]|Stop) start or stop printer session
744 PrintText(command) print screen text on printer
745 PrintWindow(command) print screen image (bitmap) on
746 printer
747 Quit exit x3270
748 *Reconnect reconnect to previous host
749 Redraw redraw window
750 Reset reset locked keyboard
751 Right move cursor right
752 Right2 move cursor right 2 positions
753 *Script(command[,arg...]) run a script
754 Scroll(Forward|Backward) scroll screen
755 SelectAll(atom) select entire screen
756 SetFont(font) change emulator font
757 *String(string) insert string (simple macro
758 facility)
759 Tab move cursor to next input
760 field
761 Toggle(option[,set|clear]) toggle an option
762 ToggleInsert toggle insert mode
763 ToggleReverse toggle reverse-input mode
764 *Transfer(option=value...') file transfer
765 Unselect release selection
766 Up move cursor up
767 ────────────────────────────────────────────────────────────────
768 (the following are similar to
769 xterm)
770 ────────────────────────────────────────────────────────────────
771 ignore do nothing
772 insert- paste selection
773 selection([atom[,atom...]])
774 move-select a combination of MoveCursor
775 and select-start
776 select-end(atom[,atom...]]) complete selection and assign
777 to atom(s)
778 select-extend move the end of a selection
779 select-start mark the beginning of a
780 selection
781 set-select(atom[,atom...]]) assign existing selection to
782 atom(s)
783 start-extend begin marking the end of a
784 selection
785
786 Note that certain parameters to x3270 actions (such as the names of
787 files and keymaps) are subject to substitutions:
788
789 The character ~ at the beginning of a string is replaced with the
790 user's home directory. A ~ character followed by a username is
791 replaced with that user's home directory.
792
793 Environment variables are substituted using the Unix shell convention
794 of $name or ${name}.
795
796 Two special pseudo-environment variables are supported. ${TIMESTAMP} is
797 replaced with a microsecond-resolution timestamp; ${UNIQUE} is replaced
798 with a string guaranteed to make a unique filename (the process ID
799 optionally followed by a dash and a string of digits). ${UNIQUE} is
800 used to form trace file names.
801
803 The PrintText produces screen snapshots in a number of different forms.
804 The default form wth no arguments sends a copy of the screen to the
805 default printer. A single argument is the command to use to print,
806 e.g., lpr.
807
808 Multiple arguments can include keywords to control the output of
809 PrintText:
810
811 file filename
812 Save the output in a file.
813
814 html Save the output as HTML. This option implies file.
815
816 rtf Save the output as RichText. This option implies file. The
817 font defaults to Courier New and the point size defaults to 8.
818 These can be overridden by the printTextFont and printTextSize
819 resources, respectively.
820
821 string Return the output as a string. This can only be used from
822 scripts.
823
824 modi Render modified fields in italics.
825
826 caption text
827 Add the specified text as a caption above the output. Within
828 text, the special sequence %T% will be replaced with a
829 timestamp.
830
831 secure Disables the pop-up dialog.
832
833 command command
834 Directs the output to a command. This allows one or more of the
835 other keywords to be specified, while still sending the output
836 to the printer.
837
838
840 There are several types of macros and script functions available.
841
842 The String Action
843 The simplest method for macros is provided via the String
844 action. The arguments to String are one or more double-quoted
845 strings which are inserted directly as if typed. The C
846 backslash conventions are honored as follows. (Entries marked *
847 mean that after sending the AID code to the host, x3270 will
848 wait for the host to unlock the keyboard before further
849 processing the string.)
850
851 \b Left
852 \exxxx EBCDIC character in hex
853 \f Clear*
854 \n Enter*
855 \pan PA(n)*
856 \pfnn PF(nn)*
857 \r Newline
858 \t Tab
859 \T BackTab
860 \uxxxx Unicode character in hex
861 \xxxxx Unicode character in hex
862
863 Note that the numeric values for the \e, \u and \x sequences can
864 be abbreviated to 2 digits. Note also that EBCDIC codes greater
865 than 255 and some Unicode character codes represent DBCS
866 characters, which will work only if x3270 is built with DBCS
867 support and the host allows DBCS input in the current field.
868
869 An example keymap entry would be:
870 Meta<Key>p: String("probs clearrdr\n")
871
872 Note: The strings are in ASCII and converted to EBCDIC, so
873 beware of inserting control codes. Also, a backslash before a p
874 may need to be doubled so it will not be removed when a resource
875 file is read.
876
877 There is also an alternate form of the String action, HexString,
878 which is used to enter non-printing data. The argument to
879 HexString is a string of hexadecimal digits, two per character.
880 A leading 0x or 0X is optional. In 3270 mode, the hexadecimal
881 data represent EBCDIC characters, which are entered into the
882 current field. In NVT mode, the hexadecimal data represent
883 ASCII characters, which are sent directly to the host.
884
885 The Script Action
886 This action causes x3270 to start a child process which can
887 execute x3270 actions. Standard input and output from the child
888 process are piped back to x3270. The Script action is fully
889 documented in x3270-script(1).
890
891 The macros Resource
892 An alternate method of defining macros is the "x3270.macros"
893 resource. This resource is similar to a keymap, but instead of
894 defining keyboard mappings, it associates a list of X actions
895 with a name. These names are displayed on a Macros menu that
896 appears when x3270 is connected to a host. Selecting one of the
897 names on the menu executes the X actions associated with it.
898 Typically the actions are String calls, but any action may be
899 specified. Here is a sample macros resource definition, which
900 would result in a four-entry Macros menu:
901 x3270.macros: \
902 log off: String("logout\n")\n\
903 vtam: String("dial vtam\n")\n\
904 pa1: PA(1)\n\
905 alt printer: PrintText("lpr -Plw2")
906
907 You can also define a different set of macros for each host. If
908 there is a resource named `x3270.macros.somehost', it defines
909 the macros menu for when x3270 is connected to somehost.
910
911 The -script Option
912 This facility allows x3270 to operate under the complete control
913 of a script. x3270 accepts actions from standard input, and
914 prints results on standard output. The -script option is fully
915 documented in x3270-script(1).
916
918 x3270 allows the direct entry of accented letters and special symbols.
919 Pressing and releasing the "Compose" key, followed by two other keys,
920 causes entry of the symbol combining those two keys. For example,
921 "Compose" followed by the "C" key and the "," (comma) key, enters the
922 "C-cedilla" symbol. A C on the status line indicates a pending
923 composite character.
924
925 The mappings between these pairs of ordinary keys and the symbols they
926 represent is controlled by the "x3270.composeMap" resource; it gives
927 the name of the map to use. The maps themselves are named
928 "x3270.composeMap.name". The default is "latin1", which gives mappings
929 for most of the symbols in the ISO 8859-1 Latin-1 character set that
930 are not in the 7-bit ASCII character set.
931
932 Note: The default keymap defines the "Multi_key" keysym as the
933 "Compose" key. If your keyboard lacks such a key, you may set up your
934 own "Compose" key with a keymap that maps some other keysym onto the
935 Compose action.
936
938 x3270 supports the full APL2 character set and the entry of APL
939 characters from the keyboard.
940
941 APL characters are supported only in the special 3270 font.
942
943 Keyboard entry of APL characters is supported through the apl keymap
944 modifier. This modifier defines the "Alt" key as an APL shift key,
945 with a typical APL keyboard layout, e.g., "Alt" pressed with the A key
946 results in the APL "alpha" symbol. Overstruck characters such as
947 "quad-quote" are not defined as single keystrokes; instead they are
948 entered as composites (see COMPOSITE CHARACTERS above). A special
949 composite map, apl, is provided for this purpose.
950
951 Note: Some keyboards do not define the "Alt" key as a modifier, so
952 keymaps that use the "Alt" key will not function. On a Sun for
953 example, this can be remedied with the command:
954
955 xmodmap -e "add mod2 = Alt_L"
956
957 For convenience, an -apl option is defined, which is an abbreviation
958 for the following resource definitions:
959 x3270.keymap: your_keymap_name,apl
960 x3270.charset: apl
961 x3270.composeMap: apl
962
963 There are a number of APL characters that are similar in appearance to
964 non-APL characters. In particular, the APL "stile", "slope," "tilde"
965 and "quotedot" characters are similar to the EBCDIC "bar", "backslash,"
966 "tilde" and "exclaim" characters. The APL characters are entered with
967 the "Alt" key, and have slightly different appearances.
968
969 The complete list of special APL keysyms is as follows. Entries marked
970 with an asterisk (*) represent simple aliases for standard EBCDIC
971 characters. Entries marked with an (S) represent Sharp APL charatcers.
972
973 APL Symbol Hex x3270 apl_ x3270 Key x3270
974 Keysym Composed Keys
975 ────────────────────────────────────────────────────────────────
976 A underbar 41 Aunderbar Alt-A A + underbar
977 alpha B0 alpha Alt-a
978 B underbar 42 Bunderbar Alt-B B + underbar
979 bar 60* bar -
980 brace left C0 braceleft Alt-{
981 brace right D0 braceright Alt-}
982 C underbar 43 Cunderbar Alt-C C + underbar
983 circle 9D circle Alt-o
984 circle bar ED circlebar circle + bar
985 circle slope CF circleslope circle +
986 slope
987 circle star FD circlestar circle + star
988 circle stile CD circlestile circle +
989 stile
990 colon 7A* colon :
991 comma 6B* comma ,
992 comma bar (S) E5 commabar comma + bar
993 D underbar 44 Dunderbar Alt-D D + underbar
994 del BA del Alt-g
995 del stile DC delstile del + stile
996 del tilde FB deltilde del + tilde
997 delta BB delta Alt-h
998 delta stile DD deltastile delta + stile
999 delta FC deltaunderbar delta +
1000 underbar underbar
1001 diamond 70 diamond up caret +
1002 down caret
1003 dieresis 72 dieresis Alt-1
1004 dieresis E5 dieresis‐ dieresis +
1005 circle (S) circle circle
1006 dieresis dot EC dieresisdot dieresis +
1007 dot
1008 dieresis jot E4 dieresisjot dieresis +
1009 (S) jot
1010 divide B8 divide Alt-+
1011
1012 dot 4B* dot
1013 down arrow 8B downarrow Alt-u
1014 down caret 78 downcaret Alt-9
1015 down caret CB downcaret‐ down caret +
1016 tilde tilde tilde
1017 down shoe AB downshoe Alt-v
1018 down stile 8E downstile Alt-d
1019 down tack AC downtack Alt-b
1020 down tack jot FE downtackjot down tack +
1021 jot
1022 down tack up DA downtack‐ down tack +
1023 tack uptack up tack
1024 E underbar 45 Eunderbar Alt-E E + underbar
1025 epsilon B1 epsilon Alt-e
1026 epsilon 75 epsilon‐ epsilon +
1027 underbar underbar underbar
1028 equal 7E* equal "="
1029 equal E1 equalunderbar equal +
1030 underbar underbar
1031 euro (S) E7 euro C + =
1032 F underbar 46 Funderbar Alt-F F + underbar
1033 G underbar 47 Gunderbar Alt-G G + underbar
1034 greater 6E* greater >
1035 H underbar 48 Hunderbar Alt-H H + underbar
1036 I underbar 49 Iunderbar Alt-I I + underbar
1037 iota B2 iota Alt-i
1038 iota underbar 74 iotaunderbar iota +
1039 underbar
1040 J underbar 51 Junderbar Alt-J J + underbar
1041 jot AF jot alt-j
1042 K underbar 52 Kunderbar Alt-K K + underbar
1043 L underbar 53 Lunderbar Alt-L L + underbar
1044 left arrow 9F leftarrow Alt-[
1045 left bracket AD leftbracket [
1046 left paren 4D* leftparen (
1047 left shoe 9B leftshoe Alt-z
1048 less 4C* less <
1049 M underbar 54 Munderbar Alt-M M + underbar
1050 N underbar 55 Nunderbar Alt-N N + underbar
1051 not equal BE notequal Alt-8 equal + slash
1052 not greater 8C notgreater Alt-4 less + equal
1053 not less AE notless Alt-6 greater +
1054 equal
1055 O underbar 56 Ounderbar Alt-O O + underbar
1056 omega B4 omega Alt-w
1057 overbar A0 overbar Alt-2
1058 P underbar 57 Punderbar Alt-P P + underbar
1059 plus 4E* plus +
1060 Q underbar 58 Qunderbar Alt-Q Q + underbar
1061 quad 90 quad Alt-l
1062 quad divide EE quaddivide quad + divide
1063 quad jot 73 quadjot quad + jot
1064 quad quote DE quadquote quad + quote
1065 quad slope CE quadslope quad + slope
1066 query 6F* query ?
1067 quote 7D* quote
1068 quote dot DB quotedot quote + dot
1069 R underbar 59 Runderbar Alt-R R + underbar
1070 rho B3 rho Alt-r
1071 right arrow 8F rightarrow Alt-]
1072 right bracket BD rightbracket ]
1073 right paren 5D* rightparen )
1074 right shoe 9A rightshoe Alt-x
1075 S underbar 62 Sunderbar Alt-S S + underbar
1076 semicolon 5E* semicolon ;
1077 slash 61* slash /
1078 slash bar EA slashbar slash + bar
1079
1080 slope B7 slope Alt-\
1081 slope bar EB slopebar slope + bar
1082 squad CC squad quad + quad
1083 star 5C* star *
1084 stile BF stile Alt-|
1085 T underbar 63 Tunderbar Alt-T T + underbar
1086 tilde 80 tilde Alt-~
1087 times B6 times Alt-=
1088 U underbar 64 Uunderbar Alt-U U + underbar
1089 underbar 6D* underbar "_"
1090 up arrow 8A uparrow Alt-y
1091 up caret 71 upcaret Alt-0
1092 up caret CA upcarettilde up caret +
1093 tilde tilde
1094 up shoe AA upshoe Alt-c
1095 up shoe jot DF upshoejot up shoe + jot
1096 up stile 8D upstile Alt-s
1097 up tack BC uptack Alt-n
1098 up tack jot EF uptackjot up tack + jot
1099 V underbar 65 Vunderbar Alt-V V + underbar
1100 W underbar 66 Wunderbar Alt-W W + underbar
1101 X underbar 67 Xunderbar Alt-X X + underbar
1102 Y underbar 68 Yunderbar Alt-Y Y + underbar
1103 Z underbar 69 Zunderbar Alt-Z Z + underbar
1104
1106 When compiled with DBCS support, x3270 supports multi-byte input
1107 methods via the XIM protocol.
1108
1109 The input method is selected by the XMODIFIERS environment variable or
1110 the -im command-line option.
1111
1112 The preedit type is specified by the -pt command-line option, with a
1113 default of OverTheSpot+1.
1114
1116 Screen printing is handled through options on the File menu or by the
1117 PrintText and PrintWindow actions. Each results in a pop-up to confirm
1118 the print command.
1119
1120 The PrintText action (usually assigned to the key <Meta>p) sends the
1121 current screen image to the printer as ASCII characters. The default
1122 command used to print the data is controlled by the
1123 "x3270.printTextCommand" resource; the default is lpr. You may also
1124 use a keymap definition to pass a print command the PrintText action
1125 itself. The command receives the screen text as its standard input.
1126 For example, the following keymap will save the screen text in a file:
1127
1128 Meta<Key>f: PrintText("cat >screen.image")
1129
1130 Note: HardPrint is an alias for PrintText.
1131
1132 The PrintWindow action (usually assigned to the key <Meta>b) sends the
1133 current screen image to the printer as a bitmap. The default command
1134 used to print the data is controlled by the "x3270.printWindowCommand"
1135 resource; the default is
1136
1137 xwd -id %d | xpr | lpr.
1138
1139 You may also use a keymap definition to pass a print command to the
1140 PrintWindow action itself. If the command contains the text "%d", the
1141 window ID of x3270 will be substituted before it is run. For example,
1142 the following keymap will pop up a duplicate of the current screen
1143 image:
1144
1145 Meta<Key>g: PrintWindow("xwd -id %d | xwud &")
1146
1147 If the command for PrintWindow or PrintText begins with an "@"
1148 character, the initial pop-up menu to confirm the print command is not
1149 displayed and the command cannot be edited.
1150
1152 Cursor highlighting will not work with if you use the NoTitleFocus
1153 option in your .twmrc file.
1154
1155
1157 x3270 supports the Sun telnet-passthru service provided by the
1158 in.telnet-gw server. This allows outbound telnet connections through a
1159 firewall machine. When a p: is prepended to a hostname, x3270 acts
1160 much like the itelnet(1) command. It contacts the machine named
1161 internet-gateway at the port defined in /etc/services as telnet-
1162 passthru (which defaults to 3514). It then passes the requested
1163 hostname and port to the in.telnet-gw server.
1164
1166 The -proxy option or the x3270.proxy resource causes x3270 to use a
1167 proxy server to connect to the host. The syntax of the option or
1168 resource is:
1169 type:host[:port]
1170
1171 The supported values for type are:
1172
1173 Proxy Type Protocol Default Port
1174 ──────────────────────────────────────────────
1175 http RFC 2817 HTTP 3128
1176 tunnel (squid)
1177 passthru Sun in.telnet-gw none
1178 socks4 SOCKS version 4 1080
1179 socks5 SOCKS version 5 1080
1180 (RFC 1928)
1181 telnet No protocol (just none
1182 send connect host
1183 port)
1184
1185 The special types socks4a and socks5d can also be used to force the
1186 proxy server to do the hostname resolution for the SOCKS protocol.
1187
1189 /etc/ibm_hosts
1190 $HOME/.x3270pro
1191
1192
1194 3270PRO Path of profile file, containing resource definitions. Merged
1195 after the system resource database, but before X3270RDB. Defaults to
1196 $HOME/.x3270pro.
1197 NOX3270PRO If set, do not read the profile.
1198 X3270RDB Additional resource definitions, merged after the profile file
1199 but before the command-line options.
1200 KEYMAP Keymap name.
1201 KEYBD Keymap name.
1202
1204 pr3287(1), s3270(1), x3270-script(1), c3270(1), tcl3270(1), telnet(1),
1205 tn3270(1), ibm_hosts(5)
1206 X Toolkit Intrinsics
1207 Data Stream Programmer's Reference, IBM GA23-0059
1208 Character Set Reference, IBM GA27-3831
1209 RFC 1576, TN3270 Current Practices
1210 RFC 1646, TN3270 Extensions for LUname and Printer Selection
1211 RFC 2355, TN3270 Enhancements
1212
1214 Copyright 1993-2020, Paul Mattes.
1215 Copyright 2004-2005, Don Russell.
1216 Copyright 2004, Dick Altenbern.
1217 Copyright 1990, Jeff Sparkes.
1218 Copyright 1989, Georgia Tech Research Corporation (GTRC), Atlanta, GA
1219 30332.
1220 All rights reserved.
1221
1222 Redistribution and use in source and binary forms, with or without
1223 modification, are permitted provided that the following conditions are
1224 met:
1225
1226
1227 * Redistributions of source code must retain the above copyright
1228 notice, this list of conditions and the following disclaimer.
1229
1230 * Redistributions in binary form must reproduce the above
1231 copyright notice, this list of conditions and the following
1232 disclaimer in the documentation and/or other materials provided
1233 with the distribution.
1234
1235 * Neither the names of Paul Mattes, Don Russell, Dick Altenbern,
1236 Jeff Sparkes, GTRC nor the names of their contributors may be
1237 used to endorse or promote products derived from this software
1238 without specific prior written permission.
1239
1240
1241 THIS SOFTWARE IS PROVIDED BY PAUL MATTES, DON RUSSELL, DICK ALTENBERN,
1242 JEFF SPARKES AND GTRC "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1243 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1244 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
1245 NO EVENT SHALL PAUL MATTES, DON RUSSELL, DICK ALTENBERN, JEFF SPARKES
1246 OR GTRC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL
1247 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1248 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
1249 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
1250 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
1251 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1252 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1253
1255 x3270 3.6ga10
1256
1257
1258
1259 23 February 2020 x3270(1)