# tcl3270 Resources

Resources are used to configure tcl3270. Resources are named items with string, integer or Boolean values.

Resource definitions come from the following sources:

- Default values are compiled into tcl3270.
- If a session file foo.tcl3270 is specified on the command line, its contents are applied. These definitions override resource values defined by compiled-in defaults.
- Command-line options override all other resource definitions. If more than one command-line option sets a resource, the last one is used.

Many resources have their own command-line switches, which are listed below. Those that do not can still be set from the command-line via the -xrm command-line option. For example the tcl3270.bsdTm resource can be set by the following command-line option:

         -xrm 'tcl3270.bsdTm: true'

Note that -xrm is supported on all of the 3270 emulators, not just on x3270.

## Resource File Syntax

A resource file (session file) has the following syntax.

- Each definition consists of:

          tcl3270.resource-name: value

- Comment lines begin with !.
- Line continuation is indicated by a backshash (\) character at the end of a line.

## Alphabetical Resource List

Name: tcl3270.aidWait
Type: Boolean
Default: false
Command Line: -set aidWait , -clear aidWait
Description:

When true, tcl3270 will not block a script after executing an AID action (Enter, Clear, PF or PA). It is then script's responsibility to poll tcl3270's status until it shows that the keyboard is no longer unlocked.

Name: tcl3270.blankFill
Type: Boolean
Default: false
Command Line: -set blankFill , -clear blankFill
Description:

When true, in 3270 mode tcl3270 will automatically convert trailing blanks in a field to NULLs in order to insert a character, and will automatically convert leading NULLs to blanks so that input data is not squeezed to the left. This works around some of the quirkier behavior of real 3270 terminals.

Name: tcl3270.bsdTm
Type: Boolean
Default: false
Description:

Defines tcl3270's response to the TELNET DO TIMING MARK option. When set to false, tcl3270 will respond to DO TIMING MARK with WONT TIMING MARK, which is consistent with most modern TELNET clients. When true, tcl3270 will respond with WILL TIMING MARK, which is consistent with the old BSD telnet command and with previous versions of tcl3270. In either case, tcl3270 will never respond to a DONT TIMING MARK option.

Name: tcl3270.certFile
Type: String
Command Line: -certfile
Description:

Gives the name of a certificate file, used by the OpenSSL library.

Name: tcl3270.charset
Type: String
Default: bracket
Command Line: -charset
Description:

This defines the host EBCDIC character set, that is, what glyph (image) is displayed for each EBCDIC code sent by the host, and what EBCDIC code is sent to the host for each character typed on the keyboard. This is more correctly referred to as the host code page.

To display the character sets supported by tcl3270, use the -v command-line option.

Name: tcl3270.color8
Type: Boolean
Default: false
Description:

If true, tcl3270 will respond to a Query(Color) with a list of 8 supported colors. If false, it will send a list of 16 colors. The 8-color setting is required for some hosts which abort a session if 16 colors are reported.

Name: tcl3270.commandTimeout
Type: Integer
Description:

Defines the number of seconds to wait for a command to complete before failing it with a timeout error.

Name: tcl3270.confDir
Type: String
Default: /usr/local/etc/x3270
Description:

Defines the tcl3270 configuration directory, where tcl3270 will search for the ibm_hosts file by default. (See tcl3270.hostsFile.)

Name: tcl3270.dbcsCgcsgid
Type: String
Description:

Overrides the compiled-in value of the CGCSGID for the current host character set, which will be reported to the host in response to a Query(Character Sets). The value is an integer, which can be prefixed with '0x' to be in hexadecimal. The upper 16 bits are the GCSGID (character set) and the lower 16 bits are the CPGID (code page). This value applies only to the double-byte (DBCS) character set. Use tcl3270.sbcsCgcsgid for the single-byte (SBCS) character set.

Name: tcl3270.dftBufferSize
Type: Integer
Default: 4096
Description:

Specifies the default buffer size for DFT IND$FILE file transfers. This value can be overridden in the File Transfer dialog and by a parameter to the Transfer action.

Name: tcl3270.dsTrace
Type: Boolean
Default: false
Command Line: -trace , -set dsTrace , -clear dsTrace
Description:

When true, tcl3270 writes a hexadecimal representation of all network traffic (and its interpretation) into a file, which defaults to /tmp/x3trc.pid. The directory prefix is defined by tcl3270.traceDir. If tcl3270.traceFile is defined, it gives the entire pathname and tcl3270.traceDir is ignored.

Name: tcl3270.eof
Type: String
Default: ^D
Description:

This setting is used only in NVT mode, and is similar in function to the stty parameter of the same name.

When connected in line-at-a-time mode (when tcl3270 gathers a line of input before forwarding it to the host), entering this character at the keyboard causes the current line of input to be forwarded to the host without a trailing CR/LF sequence.

Name: tcl3270.erase
Type: String
Default: ^?
Description:

This setting is used only in NVT mode, and is similar in function to the stty parameter of the same name.

When connected in line-at-a-time mode (tcl3270 gathers a line of input before forwarding it ot the host), entering this character at the keyboard will cause tcl3270 to discard the last character on the input line.

When connected in character-at-a-time mode (tcl3270 sends each keystroke to the host as it is entered), this is the character that will be sent to the host by the Erase action.

Name: tcl3270.eventTrace
Type: Boolean
Default: false
Command Line: -set eventTrace , -clear eventTrace
Description:

When true, tcl3270 traces information about keyboard and mouse events into a file. The default file name is /tmp/x3trc.pid. The directory prefix is defined by tcl3270.traceDir. If tcl3270.traceFile is defined, it gives the entire pathname and tcl3270.traceDir is ignored.

Name: tcl3270.extended
Type: Boolean
Default: false
Command Line: -extended
Description:

Deprecated resource -- replaced by tcl3270.model syntax

Indicates support for the 3270 Extended Data Stream.

Name: tcl3270.hostname
Type: String
Description:

Gives the name of the host to connect to. The name can include the usual options (prefixes to specify special connection options, LU names, and port). A hostname specified on the command line takes precedence over tcl3270.hostName.

The most common use of tcl3270.hostName is in session files, where a file is used to pass all of the options to establish a tcl3270 session.

Name: tcl3270.hostsFile
Type: String
Default: /usr/local/etc/x3270/ibm_hosts
Description:

The pathname of a file containing hostname aliases. The file can also be used to define a set of actions to perform when connecting to a host.

The format of the file is explained on the ibm_hosts manual page. The default pathname is actually ibm_hosts in the directory defined by tcl3270.confDir.

Name: tcl3270.icrnl
Type: Boolean
Default: true
Description:

This setting is used only in NVT mode, and is similar in function to the stty parameter of the same name. It controls whether input carriage returns are mapped to newlines.

Name: tcl3270.inlcr
Type: Boolean
Default: false
Description:

This setting is used only in NVT mode, and is similar in function to the stty parameter of the same name. It controls whether input newlines are mapped to carriage returns.

Name: tcl3270.intr
Type: String
Default: ^C
Description:

This setting is used only in NVT mode, and is similar in function to the stty parameter of the same name. When this character is typed on the keyboard, the TELNET IP (Interrupt Process) sequence is sent to the host.

Name: tcl3270.kill
Type: String
Default: ^U
Description:

This setting is used only in NVT mode, and is similar in function to the stty parameter of the same name.

When connected in line-at-a-time mode (when tcl3270 gathers a line of input before forwarding it to the host), entering this character at the keyboard causes the current input line to be erased.

When connected in character-at-a-time mode (when tcl3270 sends each keystroke to the host), this is the ASCII character that is sent to the host by the DeleteField action.

Name: tcl3270.lineWrap
Type: Boolean
Default: true
Command Line: -set lineWrap , -clear lineWrap
Description:

This setting is used only in NVT mode. When true, tcl3270 will automatically insert a CR/LF sequence when output reaches the end of a line. When false, output will pile up at the end of each line until the host sends a CR/LF sequence.

Name: tcl3270.loginMacro
Type: String
Description:

Defines a sequence of commands to run as soon as a host connection is established. Usually these would be commands used to navigate through login screens, such String, Tab and Enter.

If a tcl3270.hostsFile is in use and a matching entry is found, the login macro from that entry will be used in preference to the tcl3270.loginMacro.

Name: tcl3270.lnext
Type: String
Default: ^V
Description:

This setting is used only in NVT mode, and is similar in function to the stty parameter of the same name.

When connected in line-at-a-time mode (when tcl3270 gathers a line of input before forwarding it to the host), entering this character at the keyboard removes any special meaning from the next character entered.

Name: tcl3270.m3279
Type: Boolean
Default: false
Command Line: -color
Description:

Deprecated resource -- replaced by tcl3270.model syntax

Indicates support for color (a 3279 terminal).

Name: tcl3270.model
Type: String
Default: 3279-4-E
Command Line: -model
Description:

The terminal model that tcl3270 is emulating. The model is in three parts, separated by dashes; each part is optional.

- 3278 or 3279
  3278 specifies a monochrome (green) 3270 display.
  3279 specifies a color 3270 display.
- 2, 3, 4 or 5 The model number, which determines the size of the screen. Model 2 has 24 rows and 80 columns. Model 3 has 32 rows and 80 columns. Model 4 has 43 rows and 80 columns. Model 5 has 27 rows and 132 columns. The default is 4.
- E An optional suffix which indicates support for the 3270 Extended Data Stream (color, extended attributes, Query Reply). 3279 implies E.

Name: tcl3270.monoCase
Type: Boolean
Default: false
Command Line: -set monoCase , -clear monoCase
Description:

When true, causes tcl3270 to run in uppercase-only mode.

Name: tcl3270.numericLock
Type: Boolean
Default: false
Description:

When true, causes tcl3270 to lock the keyboard when non-numeric data is entered into fields with the Numeric attribute.

Name: tcl3270.onlcr
Type: Boolean
Default: true
Description:

Used only in NVT line-at-a-time mode; similar to the stty parameter of the same name. It controls whether output newlines are mapped to CR/LF sequences.

Name: tcl3270.oerrLock
Type: Boolean
Default: true
Description:

If true, operator errors (typing into protected fields, insert overflow, etc.) will cause the keyboard to lock with an error message in the OIA (status line). If false, these errors will simply cause the terminal bell will ring, without any keyboard lock or message.

Name: tcl3270.once
Type: Boolean
Default: false
Command Line: -once
Description:

When true, tcl3270 will exit as soon as a host disconnects. The default is false if no hostname is specified on the command line, true otherwise.

Name: tcl3270.oversize
Type: String
Command Line: -oversize
Description:

Sets the screen dimensions to be larger than the default for the chosen model. Its value is a string in the format colsxrows. It is used only if the tcl3270.model includes the "-E" (extended data stream) suffix, and only if the specified dimensions are larger than the model number defaults. Also, only hosts that support the Query Reply structured field will function properly with tcl3270 in this mode.

Name: tcl3270.port
Type: String
Default: telnet
Command Line: -port
Description:

The name of the default TCP port for tcl3270 to connect to. This can be either a symbolic name from /etc/services, or an integer.

Name: tcl3270.proxy
Type: String
Command Line: -proxy
Description:

Defines a proxy server that tcl3270 will use to connect to hosts. The value is of the form type:server[:port], where options for type are described on the tcl3270 manual page.

Name: tcl3270.quit
Type: String
Default: ^\
Description:

This setting is used only in NVT mode, and is similar in function to the stty parameter of the same name. When connected in line-at-a-time mode (when tcl3270 gathers a line of input before forwarding it to the host), entering this character at the keyboard causes the TELNET BREAK sequence to be sent to the host.

Name: tcl3270.rprnt
Type: String
Default: ^R
Description:

This setting is used only in NVT mode, and is similar in function to the stty parameter of the same name. When connected in line-at-a-time mode (when tcl3270 gathers a line of input before forwarding it to the host), entering this character at the keyboard causes the current input line to be redisplayed.

Name: tcl3270.sbcsCgcsgid
Type: String
Description:

Overrides the compiled-in value of the CGCSGID for the current host character set. The value is an integer, which can be prefixed with '0x' to be in hexadecimal. The upper 16 bits are the GCSGID (character set) and the lower 16 bits are the CPGID (code page). This value applies only to the single-byte (SBCS) character set. Use tcl3270.dbcsCgcsgid for the double-byte (DBCS) character set.

Name: tcl3270.screenTrace
Type: Boolean
Default: false
Command Line: -set screenTrace , -clear screenTrace
Description:

When true, tcl3270 will save an ASCII version of the screen image in a file every time it changes. The file name defaults to /tmp/x3scr.pid. The directory prefix is defined by the tcl3270.traceDir resource. If the tcl3270.screenTraceFile resource is defined, it defines the file name and tcl3270.traceDir is ignored.

Name: tcl3270.screenTraceFile
Type: String
Description:

If defined, gives the name of the file that screen traces will be written into.

Name: tcl3270.socket
Type: Boolean
Default: false
Command Line: -socket
Description:

When true, tcl3270 will create a Unix-domain socket than can be used by an external script to control the session. The name of the socket is /tmp/x3sck.pid. The -p option of the x3270if command can be used to connect to this socket.

Name: tcl3270.suppressActions
Type: String
Description:

A list of whitespace-separated action names, with or without parentheses, which are to be ignored. The actions will be completely inaccessible, whether by keymaps, scripts, macros or the Execute an Action menu option. This resource is intended to be used as a security precaution for users who can define their own keymaps, but who do not have access to resource definitions or command-line options.

Name: tcl3270.termName
Type: String
Command Line: -tn
Description:

An alternate name to be sent in response to the host's TELNET DO OPTION TERMINAL-NAME request. The default is IBM-, followed by the value of tcl3270.model.

Name: tcl3270.traceDir
Type: String
Default: /tmp
Description:

Defines the directory that trace files are written into.

Name: tcl3270.traceFile
Type: String
Command Line: -tracefile
Description:

If defined, gives the name of the file that data stream and event traces will be written into.

Name: tcl3270.traceFileSize
Type: String
Command Line: -tracefilesize
Description:

If defined, gives a limit on the size of the file that data stream and event traces will be written into. If not defined, or defined as 0, there will be no limit on the size of the file. The value is a number, followed by an optional suffix. If the suffix is K (e.g., 128K), the value will be multiplied by 1024. If the suffix is M, the value will be multiplied by (1024*1024). The size limit enforced at operation boundaries, not per byte, so the actual file may grow slightly larger. When the file size exceeds the limit, the second half of the file will be written over the first, so that in steady state, the file size will vary between half the tcl3270.traceFileSize and the entire tcl3270.traceFileSize.

Name: tcl3270.unlockDelay
Type: Boolean
Default: true
Description:

When tcl3270 sends the host an AID (the Enter, Clear, PF or PA actions), it locks the keyboard until the host sends a reply to unlock it. Some hosts unlock the keyboard before they are actually finished processing the command, which can cause scripts to malfunction subtly. To avoid this, tcl3270 implements a hack to briefly delay actually unlocking the keyboard. When tcl3270.unlockDelay is true, the keyboard unlock will be delayed for tcl3270.unlockDelayMs milliseconds. Setting it to false removes this delay, except when executing a macro.

Name: tcl3270.unlockDelayMs
Type: Integer
Default: 350
Description:

Overrides the default value for the unlock delay (the delay between the host unlocking the keyboard and tcl3270 actually performing the unlock). The value is in milliseconds; use 0 to turn off the delay completely, including for macros.

Name: tcl3270.werase
Type: String
Default: ^W
Description:

This setting is used only in NVT mode, and is similar in function to the stty parameter of the same name. When connected in line-at-a-time mode (when tcl3270 gathers a line of input before forwarding it to the host), entering this character at the keyboard erases the last word of input.

When connected in character-at-a-time mode (when tcl3270 sends each keystroke to the host), this is the ASCII character that is sent to the host by the DeleteWord action.

## Index of All Resources

aidWait | blankFill | bsdTm | certFile
charset | color8 | commandTimeout | confDir
dbcsCgcsgid | dftBufferSize | dsTrace | eof
erase | eventTrace | extended | hostname
hostsFile | icrnl | inlcr | intr
kill | lineWrap | loginMacro | lnext
m3279 | model | monoCase | numericLock
onlcr | oerrLock | once | oversize
port | proxy | quit | rprnt
sbcsCgcsgid | screenTrace | screenTraceFile | socket
suppressActions | termName | traceDir | traceFile
traceFileSize | unlockDelay | unlockDelayMs | werase

## Basic Configuration Resources

charset | hostname | model | port
proxy

## NVT-Mode Resources

eof | erase | icrnl | inlcr
intr | kill | lineWrap | lnext
onlcr | quit | rprnt | werase

## Protocol Resources

bsdTm | color8 | dbcsCgcsgid | dftBufferSize
sbcsCgcsgid | termName

## Terminal Interaction Resources

blankFill | numericLock | oerrLock

## Security Resources

certFile | suppressActions

## Tracing Resources

dsTrace | eventTrace | screenTrace | screenTraceFile
traceDir | traceFile | traceFileSize

## Other Resources

aidWait | commandTimeout | confDir | hostsFile
loginMacro | monoCase | once | oversize
socket | unlockDelay | unlockDelayMs

## Deprecated Resources

extended | m3279

tcl3270 verson 3.3.9ga12 Mon Mar 23 21:06:20 CDT 2009