Name
Synopsis
Description
Options
Modes
Character Sets
NVT (ANSI) Mode
Toggles
Status Line
Actions
Keymaps
File Transfer
Nested Scripts
Printer Support
Proxy
Resources
See Also
Copyrights
Version
The full syntax for host is:
[prefix:]...[LUname@]hostname[:port]
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 session.
Prepending an L: onto hostname causes wc3270 to first create an SSL tunnel to the host, and then create a TN3270 session inside the tunnel. (This function is supported only if wc3270 was built with SSL/TLS support). 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 hostname from being interpreted as indicating option prefixes or port numbers. This allows numeric IPv6 addresses to be used as hostnames.
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 wc3270 and with tn3270(1), the port may also be specified as a second, separate argument.)
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.
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 is 3278-4.
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 "wc3270.extended" resource to "false", removes the -E from the terminal name when connecting to such hosts.
The name can also be specified with the "wc3270.termName" resource.
Command-prompt mode is where the wc3270> 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 wc3270, etc. The complete list of interactive commands is listed under ACTIONS.
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 the host.
To switch from display mode to command-prompt mode, press the Escape key. To switch from command-prompt mode to display mode, press Enter (without entering a command) at the wc3270> prompt.
The default character set is bracket, which is useful for common IBM hosts which use EBCDIC codes 0xAD and 0xBD for the `[' and `]' characters, respectively.
If the host later negotiates to stop functioning in 3270 mode, wc3270 will return to ANSI emulation.
In NVT mode, wc3270 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 | wc3270.icrnl | true |
Translate NL to CR | wc3270.inlcr | false |
Erase previous character | wc3270.erase | ^? |
Erase entire line | wc3270.kill | ^U |
Erase previous word | wc3270.werase | ^W |
Redisplay line | wc3270.rprnt | ^R |
Ignore special meaning of next character | wc3270.lnext | ^V |
Interrupt | wc3270.intr | ^C |
Quit | wc3270.quit | ^\ |
End of file | wc3270.eof | ^D |
Separate keymaps can be defined for use only when wc3270 is in 3270 mode or NVT mode. See KEYMAPS for details.
The names of the toggles for use with the -set and -clear options are as follows:
Option | Name |
Monocase | monoCase |
Blank Fill | blankFill |
Track Cursor | cursorPos |
Trace Data Stream | dsTrace |
Trace Events | eventTrace |
Save Screen(s) in File | screenTrace |
Wraparound | lineWrap |
Paste with Left Margin | marginedPaste |
These names are also used as the first parameter to the Toggle action.
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 ASCII BS) |
BackTab | tab to start of previous input field |
CircumNot | input "^" in NVT mode, or "¬" in 3270 mode |
*Clear | clear screen |
Cols | report screen size |
Compose | next two keys form a special symbol |
*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 word |
*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 |
Execute(cmd) | execute a command in a shell |
FieldEnd | move cursor to end of field |
FieldMark | mark field |
HexString(hex_digits) | insert control-character string |
Home | move cursor to first input field |
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 to 24) |
PreviousWord | move cursor to previous word |
Paste | insert clipboard contents |
Printer(Start[,lu]|Stop) | start or stop printer session |
PrintText(command) | print screen text on printer |
Quit | exit wc3270 |
Redraw | redraw window |
Reset | reset locked keyboard |
Right | move cursor right |
Right2 | move cursor right 2 positions |
Rows | report screen size |
*String(string) | insert string (simple macro facility) |
*SysReq | System Request AID |
Tab | move cursor to next input field |
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 |
Multiple keymaps may be specified be separating their names with commas. Definitions in later keymaps supercede those in earlier keymaps.
In addition, separate keymaps may be defined that apply only in 3270 mode or NVT mode. For example, the resource definition wc3270.keymap.xxx.nvt or the file xxx.nvt.wc3270km will augment the definition of keymap xxx in NVT mode. Similarly, the resource definition wc3270.keymap.xxx.3270 or the file xxx.3270.wc3270km 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 following syntax:
[modifier...]<Key>key...: action[(param[,...])] ...
Here is a sample keymap definition from a file:
! Lines beginning with ! are ignored and can
! occur anywhere.
! The line below will be displayed
! by the New Session Wizard.
!description: An example.
! Definition of keymap xxx
! When Alt-c is pressed, clear the screen.
Alt<Key>c: Clear()
! When PageUp is pressed, send PF7 to the host.
<Key>PRIOR: PF(7)
! 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
wc3270.keymap.xxx: \
Alt<Key>c: Clear() \n\
<Key>PRIOR: PF(7) \n\
Ctrl<Key>A <Key>F1: PF(13)
The optional Shift, Alt or Ctrl modifiers specify that the Shift, Alt and Ctrl keys are pressed along with the specified key, respectively. The LeftCtrl, RightCtrl, LeftAlt, and RightAlt modifiers specifify a particular Ctrl or Alt key. Key is either an ISO 8859-1 symbol name, such as equal for `=' and a for `a', or a symbolic Windows 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.
Available symbolic key names are: ADD, ALT, APPS, BACK (Backspace), CLEAR, CTRL, DECIMAL, DELETE, DIVIDE, DOWN, END, ESCAPE, EXECUTE, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, HELP, HOME, INSERT, LEFT, LMENU, LWIN (Left Windows key), MULTIPLY, NEXT (Page Down), NUMLOCK, NUMPAD0, NUMPAD1, NUMPAD2, NUMPAD3, NUMPAD4, NUMPAD5, NUMPAD6, NUMPAD7, NUMPAD8, NUMPAD9, PAUSE, PRINT, PRIOR (Page Up), RETURN (Enter), RIGHT, RMENU, RWIN (Right Windows key), SCROLL, SELECT, SEPARATOR, SHIFT, SLEEP, SNAPSHOT, SUBTRACT, TAB and UP.
The base keymap is:
Key | Action |
Alt Ctrl<Key>] | Key(0x1d) |
Ctrl<Key>] | Escape |
Alt<Key>c | Clear |
Alt<Key>i | Insert |
Alt<Key>r | Reset |
Alt<Key>l | Redraw |
Alt<Key>m | Compose |
Alt<Key>^ | Key(notsign) |
<Key>Delete | Delete |
<Key>Up | Up |
<Key>Down | Down |
<Key>Left | Left |
<Key>Right | Right |
Alt<Key>1 | PA(1) |
Alt<Key>2 | PA(2) |
Alt<Key>3 | PA(3) |
<Key>Insert | ToggleInsert |
<Key>Multiply | Key(*) |
<Key>Add | Key(+) |
<Key>Separator | Key(|) |
<Key>Subtract | Key(-) |
<Key>Decimal | Key(.) |
<Key>Divide | Key(/) |
<Key>Numpadn | Key(n) |
<Key>Fn | PF(n) |
Shift<Key>Fn | PF(n+12) |
The base 3270-mode keymap adds:
Key | Action |
Ctrl<Key>[ | Escape |
Ctrl<Key>c | Clear |
Ctrl<Key>r | Reset |
Ctrl<Key>l | Redraw |
Shift Ctrl<Key>i | BackTab |
<Key>Delete | Delete |
Ctrl<Key>h | Erase |
Ctrl<Key>j | Newline |
Ctrl<Key>m | Enter |
<Key>Home | Home |
Ctrl<Key>a | Attn |
Alt<Key>a | Attn |
<Key>End | FieldEnd |
Ctrl<Key>v | Paste |
Ctrl<Key>f | FieldMark |
Ctrl<Key>d | Dup |
Ctrl<Key>u | DeleteField |
Shift<Key>Left | PreviousWord |
Shift<Key>Right | NextWord |
Shift<Key>End | EraseEOF |
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 |
HostFile | Yes | ||
LocalFile | Yes | ||
Host | No | tso | vm |
Mode | No | ascii | binary |
Cr | No | remove | add, keep |
Exist | No | keep | replace, append |
Recfm | No | fixed, variable, undefined | |
Lrecl | No | ||
Blksize | No | ||
Allocation | No | tracks, cylinders, avblock | |
PrimarySpace | No | ||
SecondarySpace | No | ||
BufferSize | No | 4096 |
The option details are as follows.
\b | Left |
\f | Clear* |
\n | Enter* |
\pan | PA(n)* |
\pfnn | PF(nn)* |
\r | Newline |
\t | Tab |
\T | BackTab |
An example keymap entry would be:
Alt<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 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 specific lu.
The action Printer Stop stops a printer session.
The resource wc3270.printer.name specifies the Windows printer used to print each job. It defaults to the value of the $PRINTER environment variable, if set. Otherwise the default system printer is used.
The resource wc3270.printer.assocCommandLine specifies the command used to start an associated printer session. It defaults to:
wpr3287.exe -assoc %L% %R% %H%
The resource wc3270.printer.luCommandLine specifies the command used to start a specific-LU printer session. It defaults to:
wpr3287.exe %R% %L%@%H%
When the printer session command is run, the following substitutions are made:
Token | Substitition |
%H% | Host IP address |
%L% | Current or specified LU |
%R% | Character set |
See wpr3287(1) for further details.
The resource wc3270.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.
type:host[:port]The supported values for type are:
The special types socks4a and socks5d can also be used to force the proxy server to do the hostname resolution for the SOCKS protocol.
Resource | Default | Option | Purpose |
blankFill | False | -set blankFill | Blank Fill mode |
charset | bracket | -charset | EBCDIC character set |
charset.foo | Definition of character set foo | ||
dsTrace | False | -trace | Data stream tracing |
eof | ^D | NVT-mode EOF character | |
erase | ^H | NVT-mode erase character | |
extended | True | Use 3270 extended data stream | |
eventTrace | False | -trace | Event tracing |
ftCommand | ind$file | Host file transfer command | |
icrnl | False | Map CR to NL on NVT-mode input | |
inlcr | False | Map NL to CR in NVT-mode input | |
intr | ^C | NVT-mode interrupt character | |
kill | ^U | NVT-mode kill character | |
lineWrap | False | -set lineWrap | NVT line wrap mode |
lnext | ^V | NVT-mode lnext character | |
m3279 | (note 1) | -model | 3279 (color) emulation |
marginedPaste | False | -set marginedPaste | Keep left margin when pasting |
monoCase | False | -set monoCase | Mono-case mode |
numericLock | False | Lock keyboard for numeric field error | |
oerrLock | False | Lock keyboard for input error | |
oversize | -oversize | Oversize screen dimensions | |
port | telnet | -port | Non-default TCP port |
printer.* | (note 4) | Printer session config | |
printerLu | (note 4) | Printer session config | |
quit | ^\ | NVT-mode quit character | |
rprnt | ^R | NVT-mode reprint character | |
secure | False | Disable "dangerous" options | |
termName | (note 2) | -tn | TELNET terminal type string |
title | Console window title | ||
traceFile | (note 3) | -tracefile | File for trace output |
werase | ^W | NVT-mode word-erase character |
Note 1: m3279 defaults to True. It can be forced to False with the proper -model option.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.txt in the directory where wc3270 was started.
Note 4: See PRINTER SUPPORT for details.
If more than one -xrm option is given for the same resource, the last one on the command line is used.
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.