c3270(1)c3270(1)NAMEc3270 - curses-based IBM host access tool
SYNOPSISc3270 [options] [host]
DESCRIPTIONc3270 opens a telnet connection to an IBM host in a console window. It
implements RFCs 2355 (TN3270E), 1576 (TN3270) and 1646 (LU name selec‐
tion), and supports IND$FILE file transfer. If the console is capable
of displaying colors, then c3270 emulates an IBM 3279. Otherwise, it
emulates a 3278.
The full syntax for host is:
Prepending a P: onto hostname causes the connection to go through the
telnet-passthru service rather than directly to the host. See PASSTHRU
Prepending an S: onto hostname removes the "extended data stream"
option reported to the host. See -tn below for further information.
Prepending an N: onto hostname turns off TN3270E support for the ses‐
Prepending an L: onto hostname causes c3270 to first create an SSL tun‐
nel to the host, and then create a TN3270 session inside the tunnel.
(This function is supported only if c3270 was built with SSL/TLS sup‐
port). Note that TLS-encrypted sessions using the TELNET START-TLS
option are negotiated with the host automatically; for these sessions
the L: prefix should not be used.
A specific LU name to use may be specified by prepending it to the
hostname with an `@'. Multiple LU names to try can be separated by
commas. An empty LU can be placed in the list with an extra comma.
The hostname may optionally be placed inside square-bracket characters
`[' and `]'. This will prevent any colon `:' characters in the host‐
name from being interpreted as indicating option prefixes or port num‐
bers. This allows numeric IPv6 addresses to be used as hostnames.
On systems that support the forkpty library call, the hostname may be
replaced with -e and a command string. This will cause c3270 to con‐
nect to a local child process, such as a shell.
The port to connect to defaults to telnet. This can be overridden with
the -port option, or by appending a port to the hostname with a colon
`:'. (For compatability with previous versions of c3270 and with
tn3270(1), the port may also be specified as a second, separate argu‐
OPTIONSc3270 understands the following options:
Forces all characters to be displayed in bold. This helps with
PC consoles which display non-bold characters in unreadably dim
colors. All-bold mode is the default for color displays, but
not for monochrome displays.
Defines the dimensions and escape sequence for the alternate
(132-column) screen mode. See SCREEN SIZE SWITCHING, below.
Causes c3270 to operate in cbreak mode, instead of raw mode. In
cbreak mode, the TTY driver will properly process XOFF and XON
characters, which are required by some terminals for proper
operation. However, those characters (usually ^S and ^Q), as
well as the characters for interrupt, quit, and lnext (usually
^C, ^\ and ^V respectively) will be seen by c3270 only if pre‐
ceded by the lnext character. The susp character (usually ^Z)
cannot be seen by c3270 at all.
Specifies an EBCDIC host character set. See CHARACTER SETS
Sets the initial value of toggle to false. The list of toggle
names is under TOGGLES below.
Defines the dimensions and escape sequence for the default
(80-column) screen mode. See SCREEN SIZE SWITCHING, below.
Uses file as the hosts file, which allows aliases for host names
and scripts to be executed at login. See ibm_hosts(1) for
Specifies the name of the input method to use for multi-byte
input. (Supported only when c3270 is compiled with DBCS sup‐
Specifies a keyboard map to be found in the resource
c3270.keymap.name or the file name. See KEYMAPS below for
Specifies the local encoding method for multi-byte text. name
is an encoding name recognized by the ICU library. (Supported
only when c3270 is compiled with DBCS support, and necessary
only when c3270 cannot figure it out from the locale.)
The model of 3270 display to be emulated. The model name is in
two parts, either of which may be omitted:
The first part is the base model, which is either 3278 or 3279.
3278 specifies a monochrome (green on black) 3270 display; 3279
specifies a color 3270 display.
The second part is the model number, which specifies the number
of rows and columns. Model 4 is the default.
Model Number Columns Rows
2 80 24
3 80 30
4 80 43
5 132 27
Note: Technically, there is no such 3270 display as a 3279-4 or
3279-5, but most hosts seem to work with them anyway.
The default model for a color display is 3279-4. For a
monochrome display, it is 3278-4.
-mono Prevents c3270 from using color, ignoring any color capabilities
reported by the terminal.
Makes the screen larger than the default for the chosen model
number. This option has effect only in combination with
extended data stream support (controlled by the "c3270.extended"
resource), and only if the host supports the Query Reply
structured field. The number of columns multiplied by the
number of rows must not exceed 16383 (3fff hex), the limit of
14-bit 3270 buffer addressing.
Specifies a different TCP port to connect to. n can be a name
from /etc/services like telnet, or a number. This option
changes the default port number used for all connections. (The
positional parameter affects only the initial connection.)
Causes c3270 to connect via the specified proxy, instead of
using a direct connection. The host can be an IP address or
hostname. The optional port can be a number or a service name.
For a list of supported proxy types, see PROXY below.
Causes c3270 to automatically start a pr3287 printer session.
If luname is ".", then the printer session will be associated
with the interactive terminal session (this requires that the
host support TN3270E). Otherwise, the value is used as the
explicit LU name to associate with the printer session.
Disables the interactive c3270> prompt. When used, a hostname
must be provided on the command line.
Sets the initial value of toggle to true. The list of toggle
names is under TOGGLES below.
Causes the emulator to create a Unix-domain socket when it
starts, for use by script processes to send commands to the
emulator. The socket is named /tmp/x3sck.process_id. The -p
option of x3270if causes it to use this socket, instead of pipes
specified by environment variables.
Specifies the terminal name to be transmitted over the telnet
connection. The default name is IBM-model_name-E, for example,
IBM-3279-4-E for a color display, or IBM-3278-4-E for a
Some hosts are confused by the -E suffix on the terminal name,
and will ignore the extra screen area on models 3, 4 and 5.
Prepending an s: on the hostname, or setting the
"c3270.extended" resource to "false", removes the -E from the
terminal name when connecting to such hosts.
The name can also be specified with the "c3270.termName"
-trace Turns on data stream and event tracing at startup. The default
trace file name is /tmp/x3trc.process_id.
Specifies a file to save data stream and event traces into.
Places a limit on the size of a trace file. If this option is
not specified, or is specified as 0 or none, the trace file will
be unlimited. If specified, the trace file cannot already
exist, and the (silently enforced) minimum size is 64 Kbytes.
The value of size can have a K or M suffix, indicating kilobytes
or megabytes respectively.
-xrm "c3270.resource: value"
Sets the value of the named resource to value. Resources
control less common c3270 options, and are defined under
MODESc3270 has two basic modes: command-prompt and session.
Command-prompt mode is where the c3270> prompt is displayed.
Interactive commands can be entered at this prompt, to connect to a
host, disconnect from a host, transfer files, display statistics, exit
c3270, etc. The complete list of interactive commands is listed under
Session mode is where the emulated 3270 screen is displayed; keyboard
commands cause the display buffer to be modified or data to be sent to
To switch from display mode to command-prompt mode, press Ctrl-]. To
switch from command-prompt mode to display mode, press Enter (without
entering a command) at the c3270> prompt.
The -charset option or the "c3270.charset" resource controls the EBCDIC
host character set used by c3270. Available sets include:
Charset Name Code Page Display Character
apl 37 3270cg-1a
belgian 500 3270cg-1a 3270-cg1
bracket 37 3270cg-1a 3270-cg1
brazilian 275 3270cg-1a 3270-cg1
cp1047 cp1047 3270cg-1a 3270-cg1
finnish 278 3270cg-1a 3270-cg1
french 297 3270cg-1a 3270-cg1
german 273 3270cg-1a 3270-cg1
icelandic 871 3270cg-1a 3270-cg1
hebrew 424 iso8859-8
italian 280 3270cg-1a 3270-cg1
japanese 1027+300 jisx0201.1976-0 +
norwegian 277 3270cg-1a 3270-cg1
russian 880 koi8-r
simplified-chinese 836+837 3270cg-1a iso8859-1
slovenian 870 iso8859-2
spanish 284 iso8859-1
thai 838 iso8859-11
turkish 1026 iso8859-9
uk 285 3270cg-1a 3270-cg1
us-intl 37 3270cg-1a 3270-cg1
The default character set is bracket, which is useful for common IBM
hosts which use EBCDIC codes 0xAD and 0xBD for the `[' and `]'
HOSTS DATABASEc3270 uses the ibm_hosts database to define aliases for host names, and
to specify macros to be executed when a connection is first made. See
ibm_hosts(5) for details.
You may specify a different ibm_hosts database with the
NVT (ANSI) MODE
Some hosts use an ASCII front-end to do initial login negotiation, then
later switch to 3270 mode. c3270 will emulate an ANSI X.64 terminal
until the host places it in 3270 mode (telnet BINARY and SEND EOR
modes, or TN3270E mode negotiation).
If the host later negotiates to stop functioning in 3270 mode, c3270
will return to ANSI emulation.
In NVT mode, c3270 supports both character-at-a-time mode and line mode
operation. You may select the mode with a menu option. When in line
mode, the special characters and operational characteristics are
defined by resources:
Mode/Character Resource Default
Translate CR to NL c3270.icrnl true
Translate NL to CR c3270.inlcr false
Erase previous c3270.erase ^?
Erase entire line c3270.kill ^U
Erase previous word c3270.werase ^W
Redisplay line c3270.rprnt ^R
Ignore special c3270.lnext ^V
meaning of next
Interrupt c3270.intr ^C
Quit c3270.quit ^\
End of file c3270.eof ^D
Separate keymaps can be defined for use only when c3270 is in 3270 mode
or NVT mode. See KEYMAPS for details.
TOGGLESc3270 has a number of configurable modes which may be selected by the
-set and -clear options.
If set, c3270 operates in uppercase-only mode.
If set, c3270 behaves in some un-3270-like ways. First, when a
character is typed into a field, all nulls in the field to the
left of that character are changed to blanks. This eliminates a
common 3270 data-entry surprise. Second, in insert mode,
trailing blanks in a field are treated like nulls, eliminating
the annoying `lock-up' that often occurs when inserting into an
field with (apparent) space at the end.
If set, the ANSI terminal emulator automatically assumes a
NEWLINE character when it reaches the end of a line.
The names of the toggles for use with the -set and -clear options are
Blank Fill blankFill
Track Cursor cursorPos
Trace Data Stream dsTrace
Trace Events eventTrace
Save Screen(s) in File screenTrace
These names are also used as the first parameter to the Toggle action.
If the terminal that c3270 is running on has at least one more row that
the 3270 model requires (e.g., 25 rows for a model 2), c3270 will
display a status line. The c3270 status line contains a variety of
information. From left to right, the fields are:
The first symbol is always a 4. If c3270 is in TN3270E mode,
the second symbol is a B; otherwise it is an A. If c3270 is in
SSCP-LU mode, the third symbol is an S. Otherwise it is blank.
If the keyboard is locked, an "X" symbol and a message field
indicate the reason for the keyboard lock.
The letter "T" indicates that one or more keystrokes are in the
The letter "K" indicates that a temporary keymap is in effect.
The letter "R" indicates that the keyboard is in reverse field
The letter "I" indicates that the keyboard is in insert mode.
The letter "P" indicates that a pr3287 session is active.
A green letter "S" indicates that the connection is secured via
The LU name associated with the session, if there is one.
The cursor row and column are optionally displayed, separated by
Here is a complete list of basic c3270 actions. Script-specific
actions are described on the x3270-script(1) manual page.
Actions marked with an asterisk (*) may block, sending data to the host
and possibly waiting for a response.
*Attn attention key
BackSpace move cursor left (or send
BackTab tab to start of previous input
CircumNot input "^" in NVT mode, or
"notsign" in 3270 mode
*Clear clear screen
Compose next two keys form a special
*Connect(host) connect to host
*CursorSelect Cursor Select AID
Delete delete character under cursor
(or send ASCII DEL)
DeleteField delete the entire field
DeleteWord delete the current or previous
*Disconnect disconnect from host
Down move cursor down
Dup duplicate field
*Enter Enter AID (or send ASCII CR)
Erase erase previous character (or
send ASCII BS)
EraseEOF erase to end of current field
EraseInput erase all input fields
Escape escape to c3270> prompt
Execute(cmd) execute a command in a shell
FieldEnd move cursor to end of field
FieldMark mark field
HexString(hex_digits) insert control-character
Home move cursor to first input
Insert set insert mode
*Interrupt send TELNET IP to host
Key(keysym) insert key keysym
Key(0xxx) insert key with ASCII code xx
Left move cursor left
Left2 move cursor left 2 positions
MonoCase toggle uppercase-only mode
MoveCursor(row, col) move cursor to (row,col)
Newline move cursor to first field on
next line (or send ASCII LF)
NextWord move cursor to next word
*PA(n) Program Attention AID (n from
1 to 3)
*PF(n) Program Function AID (n from 1
PreviousWord move cursor to previous word
Printer(Start[,lu]|Stop) start or stop printer session
PrintText(command) print screen text on printer
Quit exit c3270
Redraw redraw window
Reset reset locked keyboard
Right move cursor right
Right2 move cursor right 2 positions
*Script(command[,arg...]) run a script
*String(string) insert string (simple macro
*SysReq System Request AID
Tab move cursor to next input
Toggle(option[,set|clear]) toggle an option
ToggleInsert toggle insert mode
ToggleReverse toggle reverse-input mode
*Transfer(option=value...) file transfer
Up move cursor up
ignore do nothing
Any of the above actions may be entered at the c3270> prompt; these
commands are also available for use in keymaps (see KEYMAPS). Command
names are case-insensitive. Parameters can be specified with
parentheses and commas, e.g.:
or with spaces, e.g.:
Parameters can be quoted with double-quote characters, to allow spaces,
commas, and parentheses to be used.
c3270 also supports the following interactive commands:
Help Displays a list of available commands.
Show Displays statistics and settings.
Trace Turns tracing on or off. The command trace on enables data
stream and keyboard event tracing; the command trace off
disables it. The qualifier data or keyboard can be specified
before on or off to enable or disable a particular trace. After
on, a filename may be specified to override the default trace
file name of /tmp/x3trc.pid.
The -keymap option or the c3270.keymap resource allow a custom keymap
to be specified. If the option -keymap xxx is given (or the
c3270.keymap resource has the value xxx), c3270 will look for a
resource named c3270.keymap.xxx. If no resource definition is found,
it will look for a file named xxx.
Multiple keymaps may be specified be separating their names with
commas. Definitions in later keymaps supercede those in earlier
In addition, separate keymaps may be defined that apply only in 3270
mode or NVT mode. For example, the resource definition
c3270.keymap.xxx.nvt or the file xxx.nvt will augment the definition of
keymap xxx in NVT mode. Similarly, the resource definition
c3270.keymap.xxx.3270 or the file xxx.3270 will augment the definition
of keymap xxx in 3270 mode.
Each line (rule) in a keymap specifies actions to perform when a
particular key or sequence of keys is pressed. Keymap rules have the
[Meta][Ctrl]<Key>key...: action[(param[,...])] ...
Here is a sample keymap definition from a file:
! Lines beginning with ! are ignored and can
! occur anywhere.
! Definition of keymap xxx
! When Alt-c is pressed, clear the screen.
! When PageUp is pressed, send PF7 to the host.
! When Ctrl-a is pressed, then F1, send PF13
! to the host.
Ctrl<Key>a <Key>F1: PF(13)
Here is the same definition as a resource:
! Lines beginning with ! are ignored, but NOT
! within a definition.
! Note that the \ is required at the end of the
! first line, and \n\ is
! required at the end of every other line except
! the last.
! Definition of keymap xxx
Alt<Key>c: Clear() \n\
<Key>PPAGE: PF(7) \n\
Ctrl<Key>A <Key>F1: PF(13)
The optional Alt or Ctrl modifiers specify that the Alt and Ctrl keys
are pressed along with the specified key, respectively. Key is either
an ISO 8859-1 symbol name, such as equal for `=' and a for `a', or a
symbolic ncurses key name, such as UP. More than one key can be
specified, indicating that a sequence of keys must be pressed in order
for the rule to be matched. The action is an action from the ACTIONS
list above. More than one action may be specified; they will be
executed in order.
Keymap entries are case-sensitive and modifier-specific. This means
that a keymap for the b key will match only a lowercase b. Actions for
uppercase B, or for Alt-b or Control-B, must be specified separately.
The base keymap is:
Ctrl<Key>a Ctrl<Key>a Key(0x01)
Ctrl<Key>a Ctrl<Key>] Key(0x1d)
Ctrl<Key>a <Key>Tab BackTab
Ctrl<Key>a <Key>c Clear
Ctrl<Key>a <Key>e Escape
Ctrl<Key>a <Key>r Reset
Ctrl<Key>a <Key>l Redraw
Ctrl<Key>a <Key>m Compose
Ctrl<Key>a <Key>^ Key(notsign)
Ctrl<Key>a <Key>F(n) PF(n+12)
Ctrl<Key>a <Key>1 PA(1)
Ctrl<Key>a <Key>2 PA(2)
Ctrl<Key>a <Key>3 PA(3)
The base 3270-mode keymap adds:
THE META OR ALT KEY
Some keyboards do not have a Meta key. Instead, they have an Alt key.
Sometimes this key acts as a proper Meta key, that is, it is a modifier
key that sets the high-order bit (0x80) in the code that is transmitted
for each key. Other keyboards send a two-character sequence when the
Alt key is pressed with another key: the Escape character (0x1b),
followed by the code for the other key.
The resource c3270.metaEscape and the termcap km attribute control how
c3270 will interpret these sequences. When c3270.metaEscape is set to
true, or when c3270.metaEscape is set to auto and the termcap km
attribute is set, the keyboard is assumed to have a separate Meta key.
The Escape key can be used as an ordinary data key and has no special
When c3270.metaEscape is set to true, or when c3270.metaEscape is set
to auto and the termcap km attribute is not set, the keyboard is
assumed to use the Escape character as a prefix to indicate that the
following character is supposed to have the high-order bit set. When
c3270 sees an Escape character from the keyboard, it sets a short
timeout. If another character arrives before the timeout expires, then
c3270 will combine the two characters, setting the high-order bit of
the second. In an event trace file, the combined character is listed
as derived. In a keymap, only the combined character or the Meta
prefix may be used. The Escape key can still be used by itself, but
only if there is a short pause before pressing another key.
The default value for c3270.metaEscape is auto.
The Transfer action implements IND$FILE file transfer. This action
requires that the IND$FILE program be installed on the IBM host, and
that the 3270 cursor be located in a field that will accept a TSO or
The Transfer action can be entered at the command prompt with no
parameters, which will cause it to prompt interactively for the file
names and options. It can also be invoked with parameters to define
the entire transfer.
Because of the complexity and number of options for file transfer, the
parameters to the Transfer action take the unique form of option=value,
and can appear in any order. Note that if the value contains spaces
(such as a VM/CMS file name), then the entire parameter must be quoted,
e.g., "HostFile=xxx foo a". The options are:
Option Required? Default Other Values
Direction No send receive
Host No tso vm
Mode No ascii binary
Cr No remove add, keep
Exist No keep replace, append
Recfm No fixed, variable,
Allocation No tracks,
BufferSize No 4096
The option details are as follows.
send (the default) to send a file to the host, receive to
receive a file from the host.
The name of the file on the host.
The name of the file on the local workstation.
Host The type of host (which dictates the form of the IND$FILE
command): tso (the default) or vm.
Mode Use ascii (the default) for a text file, which will be
translated between EBCDIC and ASCII as necessary. Use binary
for non-text files.
Cr Controls how Newline characters are handled when transferring
Mode=ascii files. remove (the default) strips Newline
characters in local files before transferring them to the host.
add adds Newline characters to each host file record before
transferring it to the local workstation. keep preserves
Newline characters when transferring a local file to the host.
Exist Controls what happens when the destination file already exists.
keep (the default) preserves the file, causing the Transfer
action to fail. replace overwrites the destination file with
the source file. append appends the source file to the
Recfm Controls the record of files created on the host. fixed
creates a file with fixed-length records. variable creates a
file with variable-length records. undefined creates a file
with undefined-length records (TSO hosts only). The Lrecl
option controls the record length or maximum record length for
Recfm=fixed and Recfm=variable files, respectively.
Lrecl Specifies the record length (or maximum record length) for files
created on the host.
Specifies the block size for files created on the host. (TSO
Specifies the units for the TSO host PrimarySpace and
SecondarySpace options: tracks, cylinders or avblock.
Primary allocation for a file created on a TSO host. The units
are given by the Allocation option.
Secondary allocation for a file created on a TSO host. The
units are given by the Allocation option.
Buffer size for DFT-mode transfers. Can range from 256 to
32768. Larger values give better performance, but some hosts
may not be able to support them.
There are several types of script functions available.
The String Action
The simplest method for scripting is provided via the String
action. The arguments to String are one or more double-quoted
strings which are inserted directly as if typed. The C
backslash conventions are honored as follows. (Entries marked *
mean that after sending the AID code to the host, c3270 will
wait for the host to unlock the keyboard before further
processing the string.)
An example keymap entry would be:
Meta<Key>p: String("probs clearrdr\n")
Note: The strings are in ASCII and converted to EBCDIC, so
beware of inserting control codes.
There is also an alternate form of the String action, HexString,
which is used to enter non-printing data. The argument to
HexString is a string of hexadecimal digits, two per character.
A leading 0x or 0X is optional. In 3270 mode, the hexadecimal
data represent EBCDIC characters, which are entered into the
current field. In NVT mode, the hexadecimal data represent
ASCII characters, which are sent directly to the host.
The Script Action
This action causes c3270 to start a child process which can
execute c3270 actions. Standard input and output from the child
process are piped back to c3270. The Script action is fully
documented in x3270-script(1).
COMPOSITE CHARACTERSc3270 allows the direct entry of accented letters and special symbols.
Pressing and releasing the "Compose" key, followed by two other keys,
causes entry of the symbol combining those two keys. For example,
"Compose" followed by the "C" key and the "," (comma) key, enters the
"C-cedilla" symbol. A C on the status line indicates a pending
The mappings between these pairs of ordinary keys and the symbols they
represent is controlled by the "c3270.composeMap" resource; it gives
the name of the map to use. The maps themselves are named
"c3270.composeMap.name". The default is "latin1", which gives mappings
for most of the symbols in the ISO 8859-1 Latin-1 character set that
are not in the 7-bit ASCII character set.
Note: The default keymap defines Meta<Key>m as the "Compose" key. You
may set up your own "Compose" key with a keymap that maps some other
keysym onto the Compose action.
PRINTER SUPPORTc3270 supports associated printer sessions via the pr3287(1) program.
The Printer action is used to start or stop a pr3287 session.
The action Printer Start starts a printer session, associated with the
current LU. (This works only if the host supports TN3270E.)
The action Printer Start lu starts a printer session, associated with a
The action Printer Stop stops a printer session.
The resource c3270.printer.command specifies the command used to print
each job; it defaults to lpr. The resource
c3270.printer.assocCommandLine specifies the command used to start an
associated printer session. It defaults to:
pr3287 -assoc %L% -command "%C%" %H%
The resource c3270.printer.luCommandLine specifies the command used to
start a specific-LU printer session. It defaults to:
pr3287 -command "%C%" %R% %L%@%H%
When the printer session command is run, the following substitutions
%C% Command (value of
%H% Host IP address
%L% Current or specified LU
%R% Character set
See pr3287(1) for further details.
The resource c3270.printerLu controls automatic printer session start-
up. If it is set to `.', then whenever a login session is started, a
printer session will automatically be started, associated with the
login session. If it is set an LU name, then the automatic printer
session will be associated with the specified LU.
PASSTHRUc3270 supports the Sun telnet-passthru service provided by the
in.telnet-gw server. This allows outbound telnet connections through a
firewall machine. When a p: is prepended to a hostname, c3270 acts
much like the itelnet(1) command. It contacts the machine named
internet-gateway at the port defined in /etc/services as telnet-
passthru (which defaults to 3514). It then passes the requested
hostname and port to the in.telnet-gw server.
The -proxy option or the c3270.proxy resource causes c3270 to use a
proxy server to connect to the host. The syntax of the option or
The supported values for type are:
Proxy Type Protocol Default Port
http RFC 2817 HTTP 3128
passthru Sun in.telnet-gw none
socks4 SOCKS version 4 1080
socks5 SOCKS version 5 1080
telnet No protocol (just none
send connect host
The special types socks4a and socks5d can also be used to force the
proxy server to do the hostname resolution for the SOCKS protocol.
SCREEN SIZE SWITCHING
When running as a 3270 Model 5, c3270 can take advantage of terminals
that can switch between 80 and 132 column modes.
Because the curses library does not support mode switching, the escape
sequences and resulting screen dimensions must be specified explicitly
to c3270. These are specified with the -altscreen and -defscreen
command-line options, or the altScreen and defScreen resources.
-altscreen or altScreen defines the alternate (132-column) mode;
-defscreen or defScreen defines the default (80-column) mode.
The syntax for the options and resources is rowsxcols=init_string,
where rows and cols give the screen dimensions, and init_string is the
escape sequence to transmit to the terminal to enter that mode. For
defscreen, the minimum dimensions are 24 rows and 80 columns. For
altscreen, the minimum dimensions are 27 rows and 132 columns. Within
init_string, the usual escape sequences are supported (\E for escape,
\r, \b, etc.). For example, the init string for a 132-column xterm is:
Note: When defscreen and altscreen are specified, the model number is
always set to 5.
Certain c3270 options can be configured via resources. Resources are
defined in the file .c3270pro in the user's home directory, and by -xrm
options. The definitions are similar to X11 resources, and use a
similar syntax. The resources available in c3270 are:
Resource Default Option Purpose
allBold Auto -allbold Display all
altScreen -altscreen 132-col screen
blankFill False -set blankFill Blank Fill mode
charset bracket -charset EBCDIC character
charset.foo Definition of
composeMap latin1 Name of
cursesKeymap True Set curses
defScreen -defscreen 80-col screen
dsTrace False -trace Data stream
eof ^D NVT-mode EOF
erase ^H NVT-mode erase
extended True Use 3270
eventTrace False -trace Event tracing
ftCommand ind$file Host file
hostsFile -hostsfile Host alias/macro
icrnl False Map CR to NL on
inlcr False Map NL to CR in
intr ^C NVT-mode
keymap -keymap Keyboard map
keymap.foo Definition of
kill ^U NVT-mode kill
lineWrap False -set lineWrap NVT line wrap
lnext ^V NVT-mode lnext
m3279 (note 1) -model 3279 (color)
metaEscape Auto Interpret ESC-x
mono (note 5) -mono Ignore terminal
monoCase False -set monoCase Mono-case mode
numericLock False Lock keyboard
oerrLock True Lock keyboard
for input error
oversize -oversize Oversize screen
port telnet -port Non-default TCP
printer.* (note 4) Printer session
printerLu (note 4) Printer session
quit ^\ NVT-mode quit
rprnt ^R NVT-mode reprint
secure False Disable
termName (note 2) -tn TELNET terminal
traceDir /tmp Directory for
traceFile (note 3) -tracefile File for trace
typeahead True Allow typeahead
werase ^W NVT-mode word-
Note 1: m3279 defaults to True if the terminal supports color,
False otherwise. It can be forced to False with the proper
Note 2: The default terminal type string is constructed from the
model number, color emulation, and extended data stream modes.
E.g., a model 2 with color emulation and the extended data
stream option would be sent as IBM-3279-2-E. Note also that
when TN3270E mode is used, the terminal type is always sent as
3278, but this does not affect color capabilities.
Note 3: The default trace file is x3trc.pid in the directory
specified by the traceDir resource.
Note 4: See PRINTER SUPPORT for details.
Note 5: mono defaults to false if the terminal supports at least
8 colors and to true otherwise.
In .c3270pro, lines are continued with a backslash character.
-xrm options override definitions found in .c3270pro. If more than one
-xrm option is given for the same resource, the last one on the command
line is used.
SEE ALSOx3270(1), s3270(1), tcl3270(1), ibm_hosts(5), x3270-script(1),
pr3287(1), telnet(1), tn3270(1)
Data Stream Programmer's Reference, IBM GA23-0059
Character Set Reference, IBM GA27-3831
RFC 1576, TN3270 Current Practices
RFC 1646, TN3270 Extensions for LUname and Printer Selection
RFC 2355, TN3270 Enhancements
Modifications and original code Copyright 1993, 1994, 1995, 1996, 1997,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by Paul Mattes.
DFT File Transfer Code Copyright October 1995 by Dick Altenbern.
RPQNAMES Code Copyright 2004, 2005 by Don Russell.
Original X11 Port Copyright 1990 by Jeff Sparkes.
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all
copies and that both that copyright notice and this permission
notice appear in supporting documentation.
Copyright 1989 by Georgia Tech Research Corporation, Atlanta, GA 30332.
All Rights Reserved. GTRC hereby grants public use of this
software. Derivative works based on this software must
incorporate this copyright notice.
c3270 is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE for more
23 June 2007 c3270(1)