c3270 - curses-based IBM host access tool
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 below.
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.
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.
On systems that support the forkpty library call, the hostname may be replaced with -e and a command string. This will cause c3270 to connect 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 argument.)
Model Number | Columns |
Rows
|
2 | 80 |
24
|
3 | 80 |
30
|
4 | 80 |
43
|
5 | 132 |
27
|
Charset Name | Code Page |
Display Character Sets
|
apl | 37 |
3270cg-1a
|
belgian | 500 |
3270cg-1a 3270-cg1 iso8859-1
|
bracket | 37 |
3270cg-1a 3270-cg1 iso8859-1
|
brazilian | 275 |
3270cg-1a 3270-cg1 iso8859-1
|
finnish | 278 |
3270cg-1a 3270-cg1 iso8859-1
|
french | 297 |
3270cg-1a 3270-cg1 iso8859-1
|
german | 273 |
3270cg-1a 3270-cg1 iso8859-1
|
icelandic | 871 |
3270cg-1a 3270-cg1 iso8859-1
|
iso-hebrew | 424 |
iso8859-8
|
iso-turkish | 1026 |
iso8859-9
|
italian | 280 |
3270cg-1a 3270-cg1 iso8859-1
|
norwegian | 277 |
3270cg-1a 3270-cg1 iso8859-1
|
russian | 880 |
koi8-r
|
solvenian | 870 |
iso8859-2
|
thai | 838 |
iso8859-11 tis620.2529-0
|
uk | 285 |
3270cg-1a 3270-cg1 iso8859-1
|
us-intl | 37 |
3270cg-1a 3270-cg1 iso8859-1
|
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.
You may specify a different ibm_hosts database with the "c3270.hostsFile" resource.
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 character | c3270.erase |
^?
|
Erase entire line | c3270.kill |
^U
|
Erase previous word | c3270.werase |
^W
|
Redisplay line | c3270.rprnt |
^R
|
Ignore special meaning of next character | c3270.lnext |
^V
|
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.
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
|
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 "notsign" in 3270 mode | |||
Clear | clear screen | |||
Compose | next two keys form a special symbol | |||
Connect(l3h_t h, 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 | |||
Escape | escape to c3270> prompt | |||
Execute(cmd) | execute a command in a shell | |||
FieldEnd | move cursor to end of field | |||
FieldExit | clear to end of field and skip to next (5250 emulation) | |||
FieldMark | mark field | |||
HexString(l3h_t h, hex_digits) | insert control-character string | |||
Home | move cursor to first input field | |||
Insert | set insert mode | |||
Interrupt | send TELNET IP to host | |||
Key(l3h_t h, keysym) | insert key keysym | |||
Key(l3h_t h, 0xxx) | insert key with ASCII code xx | |||
Left | move cursor left | |||
Left2 | move cursor left 2 positions | |||
MonoCase | toggle uppercase-only mode | |||
MoveCursor(l3h_t h, 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(l3h_t h, n) | Program Attention AID (n from 1 to 3) | |||
PF(l3h_t h, n) | Program Function AID (n from 1 to 24) | |||
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(l3h_t h, string) | insert string (simple macro facility) | |||
SysReq | System Request AID | |||
Tab | move cursor to next input field | |||
ToggleInsert | toggle insert mode | |||
ToggleReverse | toggle reverse-input mode | |||
Transfer(l3h_t h, 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.:
c3270 also supports the following interactive commands:
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 only in NVT mode. For example, the resource definition c3270.keymap.xxx.nvt will augment the definition of c3270.keymap.xxx, when c3270 is in NVT mode. Similarly, the resource definition c3270.keymap.xxx.3270 will augment the definition of c3270.keymap.xxx, when c3270 is in 3270 mode.
Keymaps specify actions to perform when a particular sequence of keys is pressed. Each line in a keymap has the following syntax:
For example:
The optional Meta or Ctrl qualifiers specify that the Meta and Ctrl keys are pressed along with the specified key, respectively. The key is either a valid X11 keysym (these are the ISO 8859-1 symbol names, such as equal for `=' and a for `a') or a valid ncurses key name, such as UP. The Action is an action from the ACTIONS list, above. More than one action may be specified.
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 Meta-b or Control-B, must be specified separately.
The base keymap is:
Key |
Action
|
Ctrl<Key>] |
Escape
|
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)
|
<Key>UP |
Up
|
<Key>DOWN |
Down
|
<Key>LEFT |
Left
|
<Key>RIGHT |
Right
|
<Key>F(n) |
PF(n)
|
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:
Key |
Action
|
Ctrl<Key>c |
Clear
|
Ctrl<Key>r |
Reset
|
Ctrl<Key>l |
Redraw
|
<Key>Tab |
Tab
|
<Key>DC |
Delete
|
<Key>BACKSPACE |
BackSpace
|
<Key>BackSpace |
BackSpace
|
<Key>Return |
Enter
|
<Key>Linefeed |
Newline
|
The resource c3270.metaEscape and the termcap km attribute control how c3270 will interpret these sequences. When c3270.metaEscape is set to auto (the default), then the termcap km attribute controls how Escape sequences are interpreted: if km is set (the keyboard has a Meta key), Escape characters are not interpreted specially and can appear in keymaps; if km is not set, then Escape followed (quickly) by another keystroke is interpreted as the Meta modifier of that keystroke. If c3270.metaEscape is set to true, then Escape sequences are always interpreted as Meta sequences. If c3270.metaEscape is set to false, then Escape is always considered an ordinary keystroke.
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. 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 |
|
The option details are as follows.
\b |
Left
|
\f |
Clear*
|
\n |
Enter*
|
\pan |
PA(n)*
|
\pfnn |
PF(nn)*
|
\r |
Newline
|
\t |
Tab
|
\T |
BackTab
|
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.
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 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:
The resource c3270.printer.luCommandLine specifies the command used to start a specific-LU printer session. It defaults to:
When the printer session command is run, the following substitutions are made:
Token |
Substitition
|
%C% |
Command (value of c3270.printer.command)
|
%H% |
Host IP address
|
%L% |
Current or specified LU
|
See pr3287(1) for further details.
Resource | Default | Option |
Purpose
|
allBold | Auto | -allbold |
Display all characters bold
|
blankFill | False | -set blankFill |
Blank Fill mode
|
charset | bracket | -charset |
EBCDIC character set
|
charset.foo |
Definition of character set foo
| ||
composeMap | latin1 |
Name of composed-character map
| |
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
| |
hostsFile | -hostsfile |
Host alias/macro file
| |
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
| |
keymap | -keymap |
Keyboard map name
| |
keymap.foo |
Definition of keymap foo
| ||
kill | ^U |
NVT-mode kill character
| |
lineWrap | False | -set lineWrap |
NVT line wrap mode
|
lnext | ^V |
NVT-mode lnext character
| |
m3279 | (note 1) | -mono |
3279 (color) emulation
|
metaEscape | Auto |
Interpret ESC-x as Meta-x
| |
monoCase | False | -set monoCase |
Mono-case mode
|
numericLock | False |
Lock keyboard for numeric field error
| |
oerrLock | True |
Lock keyboard for input error
| |
oversize | -oversize |
Oversize screen dimensions
| |
port | telnet | -port |
Non-default TCP port
|
printer.* | (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
|
traceDir | /tmp |
Directory for trace files
| |
traceFile | (note 3) | -tracefile |
File for trace output
|
typeahead | True |
Allow typeahead
| |
werase | ^W |
NVT-mode word-erase character
|
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 some type of 3278.
Note 3: The default trace file is x3trc.pid in the directory specified by the traceDir resource.
Note 4: See PRINTER SUPPORT for details.
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.
Modifications Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001 by Paul Mattes.
Original X11 Port Copyright 1990 by Jeff Sparkes.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |