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