1c3270(1)                    General Commands Manual                   c3270(1)
2
3
4

NAME

6       c3270 - curses-based IBM host access tool
7

SYNOPSIS

9       c3270 [options] [host]
10
11

DESCRIPTION

13       c3270 opens a telnet connection to an IBM host in a console window.  It
14       implements RFCs 2355 (TN3270E), 1576 (TN3270) and 1646 (LU name  selec‐
15       tion),  and supports IND$FILE file transfer.  If the console is capable
16       of displaying colors, then c3270 emulates an IBM 3279.   Otherwise,  it
17       emulates a 3278.
18
19       The full syntax for host is:
20              [prefix:]...[LUname@]hostname[:port]
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"
27       option 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 c3270 to first create an SSL tun‐
33       nel to the host, and then create a TN3270 session  inside  the  tunnel.
34       (This  function  is supported only if c3270 was built with SSL/TLS sup‐
35       port).  Note that TLS-encrypted sessions  using  the  TELNET  START-TLS
36       option  are  negotiated with the host automatically; for these sessions
37       the L: prefix should not be used.
38
39       A specific LU name to use may be specified  by  prepending  it  to  the
40       hostname  with  an  `@'.   Multiple LU names to try can be separated by
41       commas.  An empty LU can be placed in the list with an extra comma.
42
43       The hostname may optionally be placed inside square-bracket  characters
44       `['  and  `]'.  This will prevent any colon `:' characters in the host‐
45       name from being interpreted as indicating option prefixes or port  num‐
46       bers.  This allows numeric IPv6 addresses to be used as hostnames.
47
48       On  systems  that support the forkpty library call, the hostname may be
49       replaced with -e and a command string.  This will cause c3270  to  con‐
50       nect to a local child process, such as a shell.
51
52       The port to connect to defaults to telnet.  This can be overridden with
53       the -port option, or by appending a port to the hostname with  a  colon
54       `:'.   (For  compatability  with  previous  versions  of c3270 and with
55       tn3270(1), the port may also be specified as a second,  separate  argu‐
56       ment.)
57

OPTIONS

59        c3270 understands the following options:
60
61       -allbold
62              Forces  all characters to be displayed in bold.  This helps with
63              PC consoles which display non-bold characters in unreadably  dim
64              colors.
65
66       -altscreen rowsxcols=init_string
67              Defines  the  dimensions  and  escape sequence for the alternate
68              (132-column) screen mode.  See SCREEN SIZE SWITCHING, below.
69
70       -cbreak
71              Causes c3270 to operate in cbreak mode, instead of raw mode.  In
72              cbreak  mode,  the TTY driver will properly process XOFF and XON
73              characters, which are required  by  some  terminals  for  proper
74              operation.   However,  those  characters (usually ^S and ^Q), as
75              well as the characters for interrupt, quit, and  lnext  (usually
76              ^C,  ^\  and ^V respectively) will be seen by c3270 only if pre‐
77              ceded by the lnext character.  The susp character  (usually  ^Z)
78              cannot be seen by c3270 at all.
79
80       -charset name
81              Specifies  an  EBCDIC  host  character  set.  See CHARACTER SETS
82              below.
83
84       -clear toggle
85              Sets the initial value of toggle to false.  The list  of  toggle
86              names is under TOGGLES below.
87
88       -defscreen rowsxcols=init_string
89              Defines  the  dimensions  and  escape  sequence  for the default
90              (80-column) screen mode.  See SCREEN SIZE SWITCHING, below.
91
92       -hostsfile file
93              Uses file as the hosts file, which allows aliases for host names
94              and  scripts  to  be  executed  at  login.  See ibm_hosts(1) for
95              details.
96
97       -im method
98              Specifies the name of the input method  to  use  for  multi-byte
99              input.   (Supported  only  when c3270 is compiled with DBCS sup‐
100              port.)
101
102       -keymap name
103              Specifies  a  keyboard  map  to  be  found   in   the   resource
104              c3270.keymap.name  or  the  file  name.   See  KEYMAPS below for
105              details.
106
107       -km name
108              Specifies the local encoding method for multi-byte  text.   name
109              is  an  encoding name recognized by the ICU library.  (Supported
110              only when c3270 is compiled with  DBCS  support,  and  necessary
111              only when c3270 cannot figure it out from the locale.)
112
113       -model name
114              The  model of 3270 display to be emulated.  The model name is in
115              two parts, either of which may be omitted:
116
117              The first part is the base model, which is either 3278 or  3279.
118              3278 specifies a monochrome 3270 display; 3279 specifies a color
119              3270 display.
120
121              The second part is the model number, which specifies the  number
122              of rows and columns.  Model 4 is the default.
123
124                            Model Number   Columns   Rows
125                            ──────────────────────────────
126                                 2           80       24
127                                 3           80       30
128                                 4           80       43
129                                 5           132      27
130
131              Note:  Technically, there is no such 3270 display as a 3279-4 or
132              3279-5, but most hosts seem to work with them anyway.
133
134              The default  model  for  a  color  display  is  3279-4.   For  a
135              monochrome display, it is 3278-4.
136
137       -mono  Forces 3278 emulation.
138
139       -oversize colsxrows
140              Makes  the  screen  larger than the default for the chosen model
141              number.   This  option  has  effect  only  in  combination  with
142              extended data stream support (controlled by the "c3270.extended"
143              resource), and  only  if  the  host  supports  the  Query  Reply
144              structured  field.   The  number  of  columns  multiplied by the
145              number of rows must not exceed 16383 (3fff hex),  the  limit  of
146              14-bit 3270 buffer addressing.
147
148       -port n
149              Specifies  a  different TCP port to connect to.  n can be a name
150              from /etc/services  like  telnet,  or  a  number.   This  option
151              changes  the default port number used for all connections.  (The
152              positional parameter affects only the initial connection.)
153
154       -printerlu luname
155              Causes c3270 to automatically start a  pr3287  printer  session.
156              If  luname  is  ".", then the printer session will be associated
157              with the interactive terminal session (this  requires  that  the
158              host  support  TN3270E).   Otherwise,  the  value is used as the
159              explicit LU name to associate with the printer session.
160
161       -secure
162              Disables the interactive c3270> prompt.  When used,  a  hostname
163              must be provided on the command line.
164
165       -set toggle
166              Sets  the  initial  value of toggle to true.  The list of toggle
167              names is under TOGGLES below.
168
169       -tn name
170              Specifies the terminal name to be transmitted  over  the  telnet
171              connection.   The default name is IBM-model_name-E, for example,
172              IBM-3279-4-E  for  a  color  display,  or  IBM-3278-4-E  for   a
173              monochrome display.
174
175              Some  hosts  are confused by the -E suffix on the terminal name,
176              and will ignore the extra screen area on  models  3,  4  and  5.
177              Prepending   an   s:   on   the   hostname,   or   setting   the
178              "c3270.extended" resource to "false", removes the  -E  from  the
179              terminal name when connecting to such hosts.
180
181              The  name  can  also  be  specified  with  the  "c3270.termName"
182              resource.
183
184       -trace Turns on data stream and event tracing at startup.  The  default
185              trace file name is /tmp/x3trc.process_id.
186
187       -tracefile file
188              Specifies  a  file  to  save  data stream and event traces into,
189              overriding the default of /tmp/x3trc.process_id.
190
191       -tracefilesize size
192              Places a limit on the size of a trace file.  If this  option  is
193              not specified, or is specified as 0 or none, the trace file will
194              be unlimited.  If  specified,  the  trace  file  cannot  already
195              exist,  and  the  (silently enforced) minimum size is 64 Kbytes.
196              The value of size can have a K or M suffix, indicating kilobytes
197              or megabytes respectively.
198
199       -xrm "c3270.resource: value"
200              Sets  the  value  of  the  named  resource  to value.  Resources
201              control  less  common  c3270  options,  and  are  defined  under
202              RESOURCES below.
203

CHARACTER SETS

205       The -charset option or the "c3270.charset" resource controls the EBCDIC
206       host character set used by c3270.  Available sets include:
207
208                Charset Name         Code Page   Display Character
209                                                 Sets
210                ─────────────────────────────────────────────────────
211                apl                  37          3270cg-1a
212                belgian              500         3270cg-1a 3270-cg1
213                                                 iso8859-1
214                bracket              37          3270cg-1a 3270-cg1
215                                                 iso8859-1
216                brazilian            275         3270cg-1a 3270-cg1
217                                                 iso8859-1
218                finnish              278         3270cg-1a 3270-cg1
219                                                 iso8859-1
220                french               297         3270cg-1a 3270-cg1
221                                                 iso8859-1
222                german               273         3270cg-1a 3270-cg1
223                                                 iso8859-1
224                icelandic            871         3270cg-1a 3270-cg1
225                                                 iso8859-1
226                iso-hebrew           424         iso8859-8
227                iso-turkish          1026        iso8859-9
228                italian              280         3270cg-1a 3270-cg1
229                                                 iso8859-1
230                japanese             1027+300    jisx0201.1976-0 +
231                                                 jisx0208.1983-0
232                norwegian            277         3270cg-1a 3270-cg1
233                                                 iso8859-1
234                russian              880         koi8-r
235                simplified-chinese   836+837     3270cg-1a iso8859-1
236                                                 + gb2312.1980-0
237                slovenian            870         iso8859-2
238                thai                 838         iso8859-11
239                                                 tis620.2529-0
240                uk                   285         3270cg-1a 3270-cg1
241                                                 iso8859-1
242                us-intl              37          3270cg-1a 3270-cg1
243                                                 iso8859-1
244
245       The  default  character  set is bracket, which is useful for common IBM
246       hosts which use EBCDIC  codes  0xAD  and  0xBD  for  the  `['  and  `]'
247       characters, respectively.
248

HOSTS DATABASE

250       c3270 uses the ibm_hosts database to define aliases for host names, and
251       to specify macros to be executed when a connection is first made.   See
252       ibm_hosts(5) for details.
253
254       You   may   specify   a   different   ibm_hosts   database   with   the
255       "c3270.hostsFile" resource.
256

NVT (ANSI) MODE

258       Some hosts use an ASCII front-end to do initial login negotiation, then
259       later  switch  to  3270 mode.  c3270 will emulate an ANSI X.64 terminal
260       until the host places it in 3270  mode  (telnet  BINARY  and  SEND  EOR
261       modes, or TN3270E mode negotiation).
262
263       If  the  host  later negotiates to stop functioning in 3270 mode, c3270
264       will return to ANSI emulation.
265
266       In NVT mode, c3270 supports both character-at-a-time mode and line mode
267       operation.   You  may select the mode with a menu option.  When in line
268       mode,  the  special  characters  and  operational  characteristics  are
269       defined by resources:
270
271                    Mode/Character          Resource     Default
272                    ─────────────────────────────────────────────
273                    Translate CR to NL    c3270.icrnl     true
274                    Translate NL to CR    c3270.inlcr     false
275
276
277                    Erase previous        c3270.erase      ^?
278                    character
279                    Erase entire line      c3270.kill      ^U
280                    Erase previous word   c3270.werase     ^W
281                    Redisplay line        c3270.rprnt      ^R
282                    Ignore special        c3270.lnext      ^V
283                    meaning of next
284                    character
285                    Interrupt              c3270.intr      ^C
286                    Quit                   c3270.quit      ^\
287                    End of file            c3270.eof       ^D
288
289       Separate keymaps can be defined for use only when c3270 is in 3270 mode
290       or NVT mode.  See KEYMAPS for details.
291

TOGGLES

293       c3270  has  a number of configurable modes which may be selected by the
294       -set and -clear options.
295
296       monoCase
297              If set, c3270 operates in uppercase-only mode.
298
299       blankFill
300              If set, c3270 behaves in some un-3270-like ways.  First, when  a
301              character  is  typed into a field, all nulls in the field to the
302              left of that character are changed to blanks.  This eliminates a
303              common  3270  data-entry  surprise.   Second,  in  insert  mode,
304              trailing blanks in a field are treated like  nulls,  eliminating
305              the  annoying `lock-up' that often occurs when inserting into an
306              field with (apparent) space at the end.
307
308       lineWrap
309              If set, the  ANSI  terminal  emulator  automatically  assumes  a
310              NEWLINE character when it reaches the end of a line.
311
312       The  names  of the toggles for use with the -set and -clear options are
313       as follows:
314
315                        Option                   Name
316                        ─────────────────────────────────────
317                        Monocase                 monoCase
318                        Blank Fill               blankFill
319                        Track Cursor             cursorPos
320                        Trace Data Stream        dsTrace
321                        Trace Events             eventTrace
322                        Save Screen(s) in File   screenTrace
323                        Wraparound               lineWrap
324
325       These names are also used as the first parameter to the Toggle action.
326

STATUS LINE

328       If the terminal that c3270 is running on has at least one more row that
329       the  3270  model  requires  (e.g.,  25  rows for a model 2), c3270 will
330       display a status line.  The c3270 status line  contains  a  variety  of
331       information.  From left to right, the fields are:
332
333       comm status
334              Three  symbols indicate the state of the connection to the host.
335              If connected, the right-hand symbol is a solid box; if  not,  it
336              is a question mark.
337
338       keyboard lock
339              If  the  keyboard  is  locked, an "X" symbol and a message field
340              indicate the reason for the keyboard lock.
341
342       typeahead
343              The letter "T" indicates that one or more keystrokes are in  the
344              typeahead buffer.
345
346       temporary keymap
347              The letter "K" indicates that a temporary keymap is in effect.
348
349       reverse
350              The  letter  "R" indicates that the keyboard is in reverse field
351              entry mode.
352
353       insert mode
354              The letter "I" indicates that the keyboard is in insert mode.
355
356       printer session
357              The letter "P" indicates that a pr3287 session is active.
358
359       LU name
360              The LU name associated with the session, if there is one.
361
362       cursor position
363              The cursor row and column are optionally displayed, separated by
364              a "/".
365

ACTIONS

367       Here  is  a  complete  list  of  basic  c3270 actions.  Script-specific
368       actions are described on the x3270-script(1) manual page.
369
370       Actions marked with an asterisk (*) may block, sending data to the host
371       and possibly waiting for a response.
372
373           *Attn                            attention key
374           BackSpace                        move cursor left (or send
375                                            ASCII BS)
376           BackTab                          tab to start of previous input
377                                            field
378           CircumNot                        input "^" in NVT mode, or
379                                            "notsign" in 3270 mode
380           *Clear                           clear screen
381           Compose                          next two keys form a special
382                                            symbol
383           *Connect(host)                   connect to host
384           *CursorSelect                    Cursor Select AID
385           Delete                           delete character under cursor
386                                            (or send ASCII DEL)
387           DeleteField                      delete the entire field
388           DeleteWord                       delete the current or previous
389                                            word
390           *Disconnect                      disconnect from host
391           Down                             move cursor down
392           Dup                              duplicate field
393           *Enter                           Enter AID (or send ASCII CR)
394           Erase                            erase previous character (or
395                                            send ASCII BS)
396           EraseEOF                         erase to end of current field
397           EraseInput                       erase all input fields
398           Escape                           escape to c3270> prompt
399           Execute(cmd)                     execute a command in a shell
400           FieldEnd                         move cursor to end of field
401           FieldMark                        mark field
402           HexString(hex_digits)            insert control-character
403                                            string
404           Home                             move cursor to first input
405                                            field
406           Insert                           set insert mode
407           *Interrupt                       send TELNET IP to host
408           Key(keysym)                      insert key keysym
409           Key(0xxx)                        insert key with ASCII code xx
410           Left                             move cursor left
411           Left2                            move cursor left 2 positions
412           MonoCase                         toggle uppercase-only mode
413           MoveCursor(row, col)             move cursor to (row,col)
414           Newline                          move cursor to first field on
415                                            next line (or send ASCII LF)
416           NextWord                         move cursor to next word
417           *PA(n)                           Program Attention AID (n from
418                                            1 to 3)
419
420
421           *PF(n)                           Program Function AID (n from 1
422                                            to 24)
423           PreviousWord                     move cursor to previous word
424           Printer(Start[,lu]|Stop)         Start or stop printer session
425           PrintText(command)               print screen text on printer
426           Quit                             exit c3270
427           Redraw                           redraw window
428           Reset                            reset locked keyboard
429           Right                            move cursor right
430           Right2                           move cursor right 2 positions
431           *Script(command[,arg...])        run a script
432           *String(string)                  insert string (simple macro
433                                            facility)
434           *SysReq                          System Request AID
435           Tab                              move cursor to next input
436                                            field
437           Toggle(option[,set|clear])       toggle an option
438           ToggleInsert                     toggle insert mode
439           ToggleReverse                    toggle reverse-input mode
440           *Transfer(option=value...)       file transfer
441           Up                               move cursor up
442           ignore                           do nothing
443
444       Any  of  the  above  actions may be entered at the c3270> prompt; these
445       commands are also available for use in keymaps (see KEYMAPS).   Command
446       names   are   case-insensitive.    Parameters  can  be  specified  with
447       parentheses and commas, e.g.:
448              PF(1)
449       or with spaces, e.g.:
450              PF 1
451       Parameters can be quoted with double-quote characters, to allow spaces,
452       commas, and parentheses to be used.
453
454       c3270 also supports the following interactive commands:
455
456       Help   Displays a list of available commands.
457
458       Show   Displays statistics and settings.
459
460       Trace  Turns  tracing  on  or  off.   The command trace on enables data
461              stream  and  keyboard  event  tracing;  the  command  trace  off
462              disables  it.   The  qualifier data or keyboard can be specified
463              before on or off to enable or disable a particular trace.  After
464              on,  a  filename  may be specified to override the default trace
465              file name of /tmp/x3trc.pid.
466

KEYMAPS

468       The -keymap option allows a keymap to  be  specified.   If  the  option
469       -keymap  xxx  is given, then c3270 will first look for a resource named
470       c3270.keymap.xxx; if that is not found, then it will look  for  a  file
471       named xxx.
472
473       Multiple  keymaps  may  be  specified  be  separating  their names with
474       commas.  Definitions  in  later  keymaps  supercede  those  in  earlier
475       keymaps.
476
477       In  addition,  separate  keymaps may be defined that apply only in 3270
478       mode or only  in  NVT  mode.   For  example,  the  resource  definition
479       c3270.keymap.xxx.nvt  will  augment the definition of c3270.keymap.xxx,
480       when  c3270  is  in  NVT  mode.   Similarly,  the  resource  definition
481       c3270.keymap.xxx.3270  will augment the definition of c3270.keymap.xxx,
482       when c3270 is in 3270 mode.
483
484       Keymaps specify actions to perform when a particular sequence  of  keys
485       is pressed.  Each line in a keymap has the following syntax:
486
487              [Meta][Ctrl]<Key>key...: Action[(param[,...])] ...
488
489       For example:
490
491              Meta<Key>c: Clear()
492              <Key>PPAGE: PF(7)
493              Ctrl<Key>A <Key>F1: PF(13)
494
495       The  optional  Meta  or  Ctrl qualifiers specify that the Meta and Ctrl
496       keys are pressed along with the specified key, respectively.   The  key
497       is  either  a  valid X11 keysym (these are the ISO 8859-1 symbol names,
498       such as equal for `=' and a for `a') or a valid  symbolic  ncurses  key
499       name,  such  as  UP.   The  Action  is an action from the ACTIONS list,
500       above.  More than one action may be  specified.   (Note  that  symbolic
501       ncurses  key  names can be used only if the c3270.cursesKeymap resource
502       is set to True, which enables ncurses keymap mode.)
503
504       Keymap entries are case-sensitive and  modifier-specific.   This  means
505       that a keymap for the b key will match only a lowercase b.  Actions for
506       uppercase B, or for Meta-b or Control-B, must be specified separately.
507
508       The base keymap is:
509
510       Key                     Action
511       ─────────────────────────────────────
512       Ctrl<Key>]              Escape
513       Ctrl<Key>a Ctrl<Key>a   Key(0x01)
514       Ctrl<Key>a Ctrl<Key>]   Key(0x1d)
515       Ctrl<Key>a <Key>Tab     BackTab
516       Ctrl<Key>a <Key>c       Clear
517       Ctrl<Key>a <Key>e       Escape
518       Ctrl<Key>a <Key>r       Reset
519       Ctrl<Key>a <Key>l       Redraw
520       Ctrl<Key>a <Key>m       Compose
521       Ctrl<Key>a <Key>^       Key(notsign)
522       <Key>UP                 Up
523       <Key>DOWN               Down
524       <Key>LEFT               Left
525       <Key>RIGHT              Right
526       <Key>F(n)               PF(n)
527       Ctrl<Key>a <Key>F(n)    PF(n+12)
528       Ctrl<Key>a <Key>1       PA(1)
529       Ctrl<Key>a <Key>2       PA(2)
530       Ctrl<Key>a <Key>3       PA(3)
531
532       The base 3270-mode keymap adds:
533
534       Key              Action
535       ───────────────────────────
536       Ctrl<Key>c       Clear
537       Ctrl<Key>r       Reset
538       Ctrl<Key>l       Redraw
539       <Key>Tab         Tab
540       <Key>DC          Delete
541       <Key>BACKSPACE   BackSpace
542       <Key>BackSpace   BackSpace
543       <Key>Return      Enter
544       <Key>Linefeed    Newline
545

THE META OR ALT KEY

547       Some keyboards do not have a Meta key.  Instead, they have an Alt  key.
548       Sometimes this key acts as a proper Meta key, that is, it is a modifier
549       key that sets the high-order bit (0x80) in the code that is transmitted
550       for  each  key.  Other keyboards send a two-character sequence when the
551       Alt key is pressed with  another  key:  the  Escape  character  (0x1b),
552       followed by the code for the other key.
553
554       The  resource c3270.metaEscape and the termcap km attribute control how
555       c3270 will interpret these sequences.  When c3270.metaEscape is set  to
556       true,  or  when  c3270.metaEscape  is  set  to  auto and the termcap km
557       attribute is set, the keyboard is assumed to have a separate Meta  key.
558       The  Escape  key can be used as an ordinary data key and has no special
559       meaning.
560
561       When c3270.metaEscape is set to true, or when c3270.metaEscape  is  set
562       to  auto  and  the  termcap  km  attribute  is not set, the keyboard is
563       assumed to use the Escape character as a prefix to  indicate  that  the
564       following  character  is supposed to have the high-order bit set.  When
565       c3270 sees an Escape character from  the  keyboard,  it  sets  a  short
566       timeout.  If another character arrives before the timeout expires, then
567       c3270 will combine the two characters, setting the  high-order  bit  of
568       the  second.   In an event trace file, the combined character is listed
569       as derived.  In a keymap, only  the  combined  character  or  the  Meta
570       prefix  may  be  used.  The Escape key can still be used by itself, but
571       only if there is a short pause before pressing another key.
572
573       The default value for c3270.metaEscape is auto.
574

FILE TRANSFER

576       The Transfer action implements IND$FILE  file  transfer.   This  action
577       requires  that  the  IND$FILE program be installed on the IBM host, and
578       that the 3270 cursor be located in a field that will accept  a  TSO  or
579       VM/CMS command.
580
581       Because  of the complexity and number of options for file transfer, the
582       parameters to the Transfer action take the unique form of option=value,
583       and can appear in any order.  The options are:
584
585       Option           Required?   Default   Other Values
586       ────────────────────────────────────────────────────────
587       Direction           No       send      receive
588       HostFile            Yes
589       LocalFile           Yes
590       Host                No       tso       vm
591       Mode                No       ascii     binary
592       Cr                  No       remove    add, keep
593       Exist               No       keep      replace, append
594       Recfm               No                 fixed, variable,
595                                              undefined
596       Lrecl               No
597       Blksize             No
598       Allocation          No                 tracks,
599                                              cylinders,
600                                              avblock
601       PrimarySpace        No
602       SecondarySpace      No
603       BufferSize          No       4096
604
605       The option details are as follows.
606
607       Direction
608              send (the default) to send  a  file  to  the  host,  receive  to
609              receive a file from the host.
610
611       HostFile
612              The name of the file on the host.
613
614       LocalFile
615              The name of the file on the local workstation.
616
617       Host   The  type  of  host  (which  dictates  the  form of the IND$FILE
618              command): tso (the default) or vm.
619
620       Mode   Use  ascii  (the  default)  for  a  text  file,  which  will  be
621              translated  between  EBCDIC  and ASCII as necessary.  Use binary
622              for non-text files.
623
624       Cr     Controls how Newline characters are  handled  when  transferring
625              Mode=ascii   files.    remove   (the   default)  strips  Newline
626              characters in local files before transferring them to the  host.
627              add  adds  Newline  characters  to  each host file record before
628              transferring  it  to  the  local  workstation.   keep  preserves
629              Newline characters when transferring a local file to the host.
630
631       Exist  Controls  what happens when the destination file already exists.
632              keep (the default) preserves  the  file,  causing  the  Transfer
633              action  to  fail.   replace overwrites the destination file with
634              the  source  file.   append  appends  the  source  file  to  the
635              destination file.
636
637       Recfm  Controls  the  record   of  files  created  on  the host.  fixed
638              creates a file with fixed-length records.   variable  creates  a
639              file  with  variable-length  records.   undefined creates a file
640              with undefined-length  records  (TSO  hosts  only).   The  Lrecl
641              option  controls  the record length or maximum record length for
642              Recfm=fixed and Recfm=variable files, respectively.
643
644       Lrecl  Specifies the record length (or maximum record length) for files
645              created on the host.
646
647       Blksize
648              Specifies  the  block  size for files created on the host.  (TSO
649              hosts only.)
650
651       Allocation
652              Specifies  the  units  for  the  TSO   host   PrimarySpace   and
653              SecondarySpace options: tracks, cylinders or avblock.
654
655       PrimarySpace
656              Primary  allocation for a file created on a TSO host.  The units
657              are given by the Allocation option.
658
659       SecondarySpace
660              Secondary allocation for a file created  on  a  TSO  host.   The
661              units are given by the Allocation option.
662
663       BufferSize
664              Buffer  size  for  DFT-mode  transfers.   Can  range from 256 to
665              32768.  Larger values give better performance,  but  some  hosts
666              may not be able to support them.
667

SCRIPTS

669       There are several types of script functions available.
670
671       The String Action
672              The  simplest  method  for  scripting is provided via the String
673              action.  The arguments to String are one or  more  double-quoted
674              strings  which  are  inserted  directly  as  if  typed.   The  C
675              backslash conventions are honored as follows.  (Entries marked *
676              mean  that  after  sending  the AID code to the host, c3270 will
677              wait  for  the  host  to  unlock  the  keyboard  before  further
678              processing the string.)
679
680              \b      Left
681              \f      Clear*
682              \n      Enter*
683              \pan    PA(n)*
684              \pfnn   PF(nn)*
685              \r      Newline
686              \t      Tab
687              \T      BackTab
688
689              An example keymap entry would be:
690              Meta<Key>p: String("probs clearrdr\n")
691
692              Note:  The  strings  are  in  ASCII  and converted to EBCDIC, so
693              beware of inserting control codes.
694
695              There is also an alternate form of the String action, HexString,
696              which  is  used  to  enter  non-printing  data.  The argument to
697              HexString is a string of hexadecimal digits, two per  character.
698              A  leading  0x or 0X is optional.  In 3270 mode, the hexadecimal
699              data represent EBCDIC characters, which  are  entered  into  the
700              current  field.   In  NVT  mode,  the hexadecimal data represent
701              ASCII characters, which are sent directly to the host.
702
703       The Script Action
704              This action causes c3270 to start  a  child  process  which  can
705              execute c3270 actions.  Standard input and output from the child
706              process are piped back to c3270.  The  Script  action  is  fully
707              documented in x3270-script(1).
708

COMPOSITE CHARACTERS

710       c3270  allows the direct entry of accented letters and special symbols.
711       Pressing and releasing the "Compose" key, followed by two  other  keys,
712       causes  entry  of  the  symbol  combining those two keys.  For example,
713       "Compose" followed by the "C" key and the "," (comma) key,  enters  the
714       "C-cedilla"  symbol.   A  C  on  the  status  line  indicates a pending
715       composite character.
716
717       The mappings between these pairs of ordinary keys and the symbols  they
718       represent  is  controlled  by the "c3270.composeMap" resource; it gives
719       the  name  of  the  map  to  use.   The  maps  themselves   are   named
720       "c3270.composeMap.name".  The default is "latin1", which gives mappings
721       for most of the symbols in the ISO 8859-1 Latin-1  character  set  that
722       are not in the 7-bit ASCII character set.
723
724       Note:  The default keymap defines Meta<Key>m as the "Compose" key.  You
725       may set up your own "Compose" key with a keymap that  maps  some  other
726       keysym onto the Compose action.
727

PRINTER SUPPORT

729       c3270  supports  associated printer sessions via the pr3287(1) program.
730       The Printer action is used to start or stop a pr3287 session.
731
732       The action Printer Start starts a printer session, associated with  the
733       current LU.  (This works only if the host supports TN3270E.)
734
735       The action Printer Start lu starts a printer session, associated with a
736       specific lu.
737
738       The action Printer Stop stops a printer session.
739
740       The resource c3270.printer.command specifies the command used to  print
741       each     job;     it     defaults     to     lpr.      The     resource
742       c3270.printer.assocCommandLine specifies the command used to  start  an
743       associated printer session.  It defaults to:
744
745              pr3287 -assoc %L% -command "%C%" %H%
746
747       The  resource c3270.printer.luCommandLine specifies the command used to
748       start a specific-LU printer session.  It defaults to:
749
750              pr3287 -command "%C%" %L%@%H%
751
752       When the printer session command is run,  the  following  substitutions
753       are made:
754
755       Token   Substitition
756       %C%     Command (value of
757               c3270.printer.command)
758       %H%     Host IP address
759       %L%     Current or specified LU
760
761       See pr3287(1) for further details.
762

PASSTHRU

764       c3270  supports  the  Sun  telnet-passthru  service  provided  by   the
765       in.telnet-gw server.  This allows outbound telnet connections through a
766       firewall machine.  When a p: is prepended to  a  hostname,  c3270  acts
767       much  like  the  itelnet(1)  command.   It  contacts  the machine named
768       internet-gateway at  the  port  defined  in  /etc/services  as  telnet-
769       passthru  (which  defaults  to  3514).   It  then  passes the requested
770       hostname and port to the in.telnet-gw server.
771

SCREEN SIZE SWITCHING

773       When running as a 3270 Model 5, c3270 can take advantage  of  terminals
774       that can switch between 80 and 132 column modes.
775
776       Because  the curses library does not support mode switching, the escape
777       sequences and resulting screen dimensions must be specified  explicitly
778       to  c3270.   These  are  specified  with  the -altscreen and -defscreen
779       command-line  options,  or  the  altScreen  and  defScreen   resources.
780       -altscreen  or  altScreen  defines  the  alternate  (132-column)  mode;
781       -defscreen or defScreen defines the default (80-column) mode.
782
783       The syntax for the  options  and  resources  is  rowsxcols=init_string,
784       where  rows and cols give the screen dimensions, and init_string is the
785       escape sequence to transmit to the terminal to enter  that  mode.   For
786       defscreen,  the  minimum  dimensions  are  24 rows and 80 columns.  For
787       altscreen, the minimum dimensions are 27 rows and 132 columns.   Within
788       init_string,  the  usual escape sequences are supported (\E for escape,
789       \r, \b, etc.).  For example, the init string for a 132-column xterm is:
790
791              \E[?40h\E[?3h
792
793       Note: When defscreen and altscreen are specified, the model  number  is
794       always set to 5.
795

RESOURCES

797       Certain  c3270  options can be configured via resources.  Resources are
798       defined in the file .c3270pro in the user's home directory, and by -xrm
799       options.   The  definitions  are  similar  to  X11 resources, and use a
800       similar syntax.  The resources available in c3270 are:
801
802       Resource       Default    Option           Purpose
803       ────────────────────────────────────────────────────────────
804       allBold        Auto       -allbold         Display all
805                                                  characters bold
806       altScreen                 -altscreen       132-col screen
807                                                  definition
808       blankFill      False      -set blankFill   Blank Fill mode
809       charset        bracket    -charset         EBCDIC character
810                                                  set
811       charset.foo                                Definition of
812                                                  character set
813                                                  foo
814       composeMap     latin1                      Name of
815                                                  composed-
816                                                  character map
817       cursesKeymap   True                        Set curses
818                                                  keymap option
819       defScreen                 -defscreen       80-col screen
820                                                  definition
821       dsTrace        False      -trace           Data stream
822                                                  tracing
823       eof            ^D                          NVT-mode EOF
824                                                  character
825       erase          ^H                          NVT-mode erase
826                                                  character
827       extended       True                        Use 3270
828                                                  extended data
829                                                  stream
830       eventTrace     False      -trace           Event tracing
831       ftCommand      ind$file                    Host file
832                                                  transfer command
833       hostsFile                 -hostsfile       Host alias/macro
834                                                  file
835       icrnl          False                       Map CR to NL on
836                                                  NVT-mode input
837       inlcr          False                       Map NL to CR in
838                                                  NVT-mode input
839       intr           ^C                          NVT-mode
840                                                  interrupt
841                                                  character
842       keymap                    -keymap          Keyboard map
843                                                  name
844       keymap.foo                                 Definition of
845                                                  keymap foo
846       kill           ^U                          NVT-mode kill
847                                                  character
848       lineWrap       False      -set lineWrap    NVT line wrap
849                                                  mode
850       lnext          ^V                          NVT-mode lnext
851                                                  character
852
853       m3279          (note 1)   -mono            3279 (color)
854                                                  emulation
855       metaEscape     Auto                        Interpret ESC-x
856                                                  as Meta-x
857       monoCase       False      -set monoCase    Mono-case mode
858       numericLock    False                       Lock keyboard
859                                                  for numeric
860                                                  field error
861       oerrLock       True                        Lock keyboard
862                                                  for input error
863       oversize                  -oversize        Oversize screen
864                                                  dimensions
865       port           telnet     -port            Non-default TCP
866                                                  port
867       printer.*      (note 4)                    Printer session
868                                                  config
869       quit           ^\                          NVT-mode quit
870                                                  character
871       rprnt          ^R                          NVT-mode reprint
872                                                  character
873       secure         False                       Disable
874                                                  "dangerous"
875                                                  options
876       termName       (note 2)   -tn              TELNET terminal
877                                                  type string
878       traceDir       /tmp                        Directory for
879                                                  trace files
880       traceFile      (note 3)   -tracefile       File for trace
881                                                  output
882       typeahead      True                        Allow typeahead
883       werase         ^W                          NVT-mode word-
884                                                  erase character
885
886              Note  1:  m3279 defaults to True if the terminal supports color,
887              False otherwise.  It can be  forced  to  False  with  the  -mono
888              option.
889
890              Note 2: The default terminal type string is constructed from the
891              model number, color emulation, and extended data  stream  modes.
892              E.g.,  a  model  2  with  color  emulation and the extended data
893              stream option would be sent as  IBM-3279-2-E.   Note  also  that
894              when  TN3270E  mode is used, the terminal type is always sent as
895              some type of 3278.
896
897              Note 3: The default trace file is  x3trc.pid  in  the  directory
898              specified by the traceDir resource.
899
900              Note 4: See PRINTER SUPPORT for details.
901
902       In .c3270pro, lines are continued with a backslash character.
903
904       -xrm options override definitions found in .c3270pro.  If more than one
905       -xrm option is given for the same resource, the last one on the command
906       line is used.
907

FILES

909       /usr/local/lib/x3270/ibm_hosts
910       $HOME/.c3270pro
911
912

SEE ALSO

914       x3270(1),    s3270(1),   tcl3270(1),   ibm_hosts(5),   x3270-script(1),
915       pr3287(1), telnet(1), tn3270(1)
916       Data Stream Programmer's Reference, IBM GA23-0059
917       Character Set Reference, IBM GA27-3831
918       RFC 1576, TN3270 Current Practices
919       RFC 1646, TN3270 Extensions for LUname and Printer Selection
920       RFC 2355, TN3270 Enhancements
921

COPYRIGHTS

923       Modifications Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
924       2002, 2004 by Paul Mattes.
925       Original X11 Port Copyright 1990 by Jeff Sparkes.
926              Permission  to  use,  copy, modify, and distribute this software
927              and its documentation for any purpose and without fee is  hereby
928              granted,  provided that the above copyright notice appear in all
929              copies and that both that copyright notice and  this  permission
930              notice appear in supporting documentation.
931       Copyright 1989 by Georgia Tech Research Corporation, Atlanta, GA 30332.
932              All  Rights  Reserved.   GTRC  hereby  grants public use of this
933              software.   Derivative  works  based  on  this   software   must
934              incorporate this copyright notice.
935       c3270  is  distributed  in the hope that it will be useful, but WITHOUT
936       ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY  or
937       FITNESS  FOR  A  PARTICULAR  PURPOSE.   See  the  file LICENSE for more
938       details.
939

VERSION

941       c3270 3.3.4
942
943
944
945                                 09 April 2005                        c3270(1)
Impressum