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       c3270 [options] session-file.c3270
12
13

DESCRIPTION

15       c3270 opens a telnet connection to an IBM host in a console window.  It
16       implements RFCs 2355 (TN3270E), 1576 (TN3270) and 1646 (LU name  selec‐
17       tion),  and supports IND$FILE file transfer.  If the console is capable
18       of displaying colors, then c3270 emulates an IBM 3279.   Otherwise,  it
19       emulates a 3278.
20
21       The full syntax for host is:
22              [prefix:]...[LUname@]hostname[:port]
23
24       Prepending  a  P: onto hostname causes the connection to go through the
25       telnet-passthru service rather than directly to the host.  See PASSTHRU
26       below.
27
28       Prepending  an  S:  onto  hostname  removes  the "extended data stream"
29       option reported to the host.  See -tn below for further information.
30
31       Prepending an N: onto hostname turns off TN3270E support for  the  ses‐
32       sion.
33
34       Prepending an L: onto hostname causes c3270 to first create an SSL tun‐
35       nel to the host, and then create a TN3270 session  inside  the  tunnel.
36       (This  function  is supported only if c3270 was built with SSL/TLS sup‐
37       port).  Note that TLS-encrypted sessions  using  the  TELNET  START-TLS
38       option  are  negotiated with the host automatically; for these sessions
39       the L: prefix should not be used.
40
41       A specific Logical Unit (LU) name to use may be specified by prepending
42       it  to the hostname with an `@'.  Multiple LU names to try can be sepa‐
43       rated by commas.  An empty LU can be placed in the list with  an  extra
44       comma.   (Note  that the LU name is used for different purposes by dif‐
45       ferent kinds of hosts.  For example, CICS uses the LU name as the  Ter‐
46       minal ID.)
47
48       The  hostname may optionally be placed inside square-bracket characters
49       `[' and `]'.  This will prevent any colon `:' characters in  the  host‐
50       name  from being interpreted as indicating option prefixes or port num‐
51       bers.  This allows numeric IPv6 addresses to be used as hostnames.
52
53       On systems that support the forkpty library call, the hostname  may  be
54       replaced  with  -e and a command string.  This will cause c3270 to con‐
55       nect to a local child process, such as a shell.
56
57       The port to connect to defaults to telnet.  This can be overridden with
58       the  -port  option, or by appending a port to the hostname with a colon
59       `:'.  (For compatability with  previous  versions  of  c3270  and  with
60       tn3270(1),  the  port may also be specified as a second, separate argu‐
61       ment.)
62
63

OPTIONS

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

STATUS LINE

247       If the terminal that c3270 is running on has at least one more row that
248       the  3270  model  requires  (e.g.,  25  rows for a model 2), c3270 will
249       display a status line.  The c3270 status line  contains  a  variety  of
250       information.  From left to right, the fields are:
251
252       comm status
253              The  first  symbol  is always a 4.  If c3270 is in TN3270E mode,
254              the second symbol is a B; otherwise it is an A.  If c3270 is  in
255              SSCP-LU mode, the third symbol is an S.  Otherwise it is blank.
256
257       keyboard lock
258              If  the  keyboard  is  locked, an "X" symbol and a message field
259              indicate the reason for the keyboard lock.
260
261       typeahead
262              The letter "T" indicates that one or more keystrokes are in  the
263              typeahead buffer.
264
265       temporary keymap
266              The letter "K" indicates that a temporary keymap is in effect.
267
268       reverse
269              The  letter  "R" indicates that the keyboard is in reverse field
270              entry mode.
271
272       insert mode
273              The letter "I" indicates that the keyboard is in insert mode.
274
275       printer session
276              The letter "P" indicates that a pr3287 session is active.
277
278       secure connection
279              A green letter "S" indicates that the connection is secured  via
280              SSL/TLS.
281
282       LU name
283              The LU name associated with the session, if there is one.
284
285       cursor position
286              The cursor row and column are optionally displayed, separated by
287              a "/".
288
289

ACTIONS

291       Here is a  complete  list  of  basic  c3270  actions.   Script-specific
292       actions are described on the x3270-script(1) manual page.
293
294       Actions marked with an asterisk (*) may block, sending data to the host
295       and possibly waiting for a response.
296
297           *Attn                            attention key
298           BackSpace                        move cursor left (or send
299                                            ASCII BS)
300           BackTab                          tab to start of previous input
301                                            field
302           CircumNot                        input "^" in NVT mode, or
303                                            "notsign" in 3270 mode
304           *Clear                           clear screen
305           Compose                          next two keys form a special
306                                            symbol
307           *Connect(host)                   connect to host
308           *CursorSelect                    Cursor Select AID
309           Delete                           delete character under cursor
310                                            (or send ASCII DEL)
311           DeleteField                      delete the entire field
312           DeleteWord                       delete the current or previous
313                                            word
314           *Disconnect                      disconnect from host
315           Down                             move cursor down
316           Dup                              duplicate field
317           *Enter                           Enter AID (or send ASCII CR)
318           Erase                            erase previous character (or
319                                            send ASCII BS)
320           EraseEOF                         erase to end of current field
321           EraseInput                       erase all input fields
322           Escape                           escape to c3270> prompt
323           Execute(cmd)                     execute a command in a shell
324           FieldEnd                         move cursor to end of field
325           FieldMark                        mark field
326           HexString(hex_digits)            insert control-character
327                                            string
328           Home                             move cursor to first input
329                                            field
330           Insert                           set insert mode
331           *Interrupt                       send TELNET IP to host
332           Key(keysym)                      insert key keysym
333           Key(0xxx)                        insert key with character code
334                                            xx
335
336           Left                             move cursor left
337           Left2                            move cursor left 2 positions
338           MonoCase                         toggle uppercase-only mode
339           MoveCursor(row, col)             move cursor to (row,col)
340           Newline                          move cursor to first field on
341                                            next line (or send ASCII LF)
342           NextWord                         move cursor to next word
343           *PA(n)                           Program Attention AID (n from
344                                            1 to 3)
345           *PF(n)                           Program Function AID (n from 1
346                                            to 24)
347           PreviousWord                     move cursor to previous word
348           Printer(Start[,lu]|Stop)         start or stop printer session
349           PrintText(command)               print screen text on printer
350           Quit                             exit c3270
351           Redraw                           redraw window
352           Reset                            reset locked keyboard
353           Right                            move cursor right
354           Right2                           move cursor right 2 positions
355           *Script(command[,arg...])        run a script
356           *String(string)                  insert string (simple macro
357                                            facility)
358           *SysReq                          System Request AID
359           Tab                              move cursor to next input
360                                            field
361           Toggle(option[,set|clear])       toggle an option
362           ToggleInsert                     toggle insert mode
363           ToggleReverse                    toggle reverse-input mode
364           *Transfer(option=value...)       file transfer
365           Up                               move cursor up
366           ignore                           do nothing
367
368       Any  of  the  above  actions may be entered at the c3270> prompt; these
369       commands are also available for use in keymaps (see KEYMAPS).   Command
370       names   are   case-insensitive.    Parameters  can  be  specified  with
371       parentheses and commas, e.g.:
372              PF(1)
373       or with spaces, e.g.:
374              PF 1
375       Parameters can be quoted with double-quote characters, to allow spaces,
376       commas, and parentheses to be used.
377
378       c3270 also supports the following interactive commands:
379
380       Help   Displays a list of available commands.
381
382       Show   Displays statistics and settings.
383
384       Trace  Turns  tracing  on  or  off.   The command trace on enables data
385              stream  and  keyboard  event  tracing;  the  command  trace  off
386              disables  it.   The  qualifier data or keyboard can be specified
387              before on or off to enable or disable a particular trace.  After
388              on,  a  filename  may be specified to override the default trace
389              file name of /tmp/x3trc.pid.
390

KEYMAPS

392       The -keymap option or the c3270.keymap resource allow a  custom  keymap
393       to  be  specified.   If  the  option  -keymap  xxx  is  given  (or  the
394       c3270.keymap resource has  the  value  xxx),  c3270  will  look  for  a
395       resource  named  c3270.keymap.xxx.  If no resource definition is found,
396       it will look for a file named xxx.
397
398       Multiple keymaps may  be  specified  be  separating  their  names  with
399       commas.   Definitions  in  later  keymaps  supercede  those  in earlier
400       keymaps.
401
402       In addition, separate keymaps may be defined that apply  only  in  3270
403       mode   or   NVT   mode.    For   example,   the   resource   definition
404       c3270.keymap.xxx.nvt or the file xxx.nvt will augment the definition of
405       keymap   xxx   in   NVT   mode.   Similarly,  the  resource  definition
406       c3270.keymap.xxx.3270 or the file xxx.3270 will augment the  definition
407       of keymap xxx in 3270 mode.
408
409       Each  line  (rule)  in  a  keymap  specifies  actions to perform when a
410       particular key or sequence of keys is pressed.  Keymap rules  have  the
411       following syntax:
412
413              [Meta][Ctrl]<Key>key...: action[(param[,...])] ...
414
415       Here is a sample keymap definition from a file:
416
417              ! Lines beginning with ! are ignored and can
418              ! occur anywhere.
419              ! Definition of keymap xxx
420              !  When Alt-c is pressed, clear the screen.
421              Alt<Key>c: Clear()
422              !  When PageUp is pressed, send PF7 to the host.
423              <Key>PPAGE: PF(7)
424              !  When Ctrl-a is pressed, then F1, send PF13
425              !  to the host.
426              Ctrl<Key>a <Key>F1: PF(13)
427
428       Here is the same definition as a resource:
429
430              ! Lines beginning with ! are ignored, but NOT
431              ! within a definition.
432              ! Note that the \ is required at the end of the
433              ! first line, and \n\ is
434              ! required at the end of every other line except
435              ! the last.
436              ! Definition of keymap xxx
437              c3270.keymap.xxx: \
438               Alt<Key>c: Clear() \n\
439               <Key>PPAGE: PF(7) \n\
440               Ctrl<Key>A <Key>F1: PF(13)
441
442       The  optional  Alt or Ctrl modifiers specify that the Alt and Ctrl keys
443       are pressed along with the specified key, respectively.  Key is  either
444       an  ISO  8859-1  symbol name, such as equal for `=' and a for `a', or a
445       symbolic ncurses key name, such as  UP.   More  than  one  key  can  be
446       specified,  indicating that a sequence of keys must be pressed in order
447       for the rule to be matched.  The action is an action from  the  ACTIONS
448       list  above.   More  than  one  action  may  be specified; they will be
449       executed in order.
450
451       Keymap entries are case-sensitive and  modifier-specific.   This  means
452       that a keymap for the b key will match only a lowercase b.  Actions for
453       uppercase B, or for Alt-b or Control-B, must be specified separately.
454
455       The base keymap is:
456
457       Key                     Action
458       ─────────────────────────────────────
459       Ctrl<Key>]              Escape
460       Ctrl<Key>a Ctrl<Key>a   Key(0x01)
461       Ctrl<Key>a Ctrl<Key>]   Key(0x1d)
462       Ctrl<Key>a <Key>Tab     BackTab
463       Ctrl<Key>a <Key>c       Clear
464       Ctrl<Key>a <Key>e       Escape
465       Ctrl<Key>a <Key>r       Reset
466       Ctrl<Key>a <Key>l       Redraw
467       Ctrl<Key>a <Key>m       Compose
468       Ctrl<Key>a <Key>^       Key(notsign)
469       <Key>UP                 Up
470       <Key>DOWN               Down
471
472       <Key>LEFT               Left
473       <Key>RIGHT              Right
474       <Key>F(n)               PF(n)
475       Ctrl<Key>a <Key>F(n)    PF(n+12)
476       Ctrl<Key>a <Key>1       PA(1)
477       Ctrl<Key>a <Key>2       PA(2)
478       Ctrl<Key>a <Key>3       PA(3)
479
480       The base 3270-mode keymap adds:
481
482       Key              Action
483       ──────────────────────────────
484       Ctrl<Key>c       Clear
485       Ctrl<Key>d       Dup
486       Ctrl<Key>f       FieldMark
487       Ctrl<Key>i       Tab
488       Ctrl<Key>l       Redraw
489       Ctrl<Key>r       Reset
490       Ctrl<Key>u       DeleteField
491       <Key>BackSpace   BackSpace
492       <Key>Return      Enter
493       <Key>Tab         Tab
494       <Key>Linefeed    Newline
495       <Key>BACKSPACE   BackSpace
496       <Key>DC          Delete
497       <Key>HOME        Home
498       <Key>IC          ToggleInsert
499

THE META OR ALT KEY

501       Some keyboards do not have a Meta key.  Instead, they have an Alt  key.
502       Sometimes this key acts as a proper Meta key, that is, it is a modifier
503       key that sets the high-order bit (0x80) in the code that is transmitted
504       for  each  key.  Other keyboards send a two-character sequence when the
505       Alt key is pressed with  another  key:  the  Escape  character  (0x1b),
506       followed by the code for the other key.
507
508       The  resource c3270.metaEscape and the termcap km attribute control how
509       c3270 will interpret these sequences.  When c3270.metaEscape is set  to
510       true,  or  when  c3270.metaEscape  is  set  to  auto and the termcap km
511       attribute is set, the keyboard is assumed to have a separate Meta  key.
512       The  Escape  key can be used as an ordinary data key and has no special
513       meaning.
514
515       When c3270.metaEscape is set to true, or when c3270.metaEscape  is  set
516       to  auto  and  the  termcap  km  attribute  is not set, the keyboard is
517       assumed to use the Escape character as a prefix to  indicate  that  the
518       following  character  is supposed to have the high-order bit set.  When
519       c3270 sees an Escape character from  the  keyboard,  it  sets  a  short
520       timeout.  If another character arrives before the timeout expires, then
521       c3270 will combine the two characters, setting the  high-order  bit  of
522       the  second.   In an event trace file, the combined character is listed
523       as derived.  In a keymap, only  the  combined  character  or  the  Meta
524       prefix  may  be  used.  The Escape key can still be used by itself, but
525       only if there is a short pause before pressing another key.
526
527       The default value for c3270.metaEscape is auto.
528

FILE TRANSFER

530       The Transfer action implements IND$FILE  file  transfer.   This  action
531       requires  that  the  IND$FILE program be installed on the IBM host, and
532       that the 3270 cursor be located in a field that will accept  a  TSO  or
533       VM/CMS command.
534
535       The  Transfer  action  can  be  entered  at  the command prompt with no
536       parameters, which will cause it to prompt interactively  for  the  file
537       names  and  options.   It can also be invoked with parameters to define
538       the entire transfer.
539
540       Because of the complexity and number of options for file transfer,  the
541       parameters to the Transfer action take the unique form of option=value,
542       and can appear in any order.  Note that if the  value  contains  spaces
543       (such as a VM/CMS file name), then the entire parameter must be quoted,
544       e.g., "HostFile=xxx foo a".  The options are:
545
546       Option           Required?   Default   Other Values
547       ────────────────────────────────────────────────────────
548       Direction           No       receive   send
549       HostFile            Yes
550       LocalFile           Yes
551       Host                No       tso       vm
552       Mode                No       ascii     binary
553       Cr                  No       remove    add, keep
554       Remap               No       yes       no
555       Exist               No       keep      replace, append
556       Recfm               No                 fixed, variable,
557                                              undefined
558       Lrecl               No
559       Blksize             No
560       Allocation          No                 tracks,
561                                              cylinders,
562                                              avblock
563       PrimarySpace        No
564       SecondarySpace      No
565       BufferSize          No       4096
566
567       The option details are as follows.
568
569       Direction
570              send  to send a file to the host, receive to receive a file from
571              the host.
572
573       HostFile
574              The name of the file on the host.
575
576       LocalFile
577              The name of the file on the local workstation.
578
579       Host   The type of host  (which  dictates  the  form  of  the  IND$FILE
580              command): tso (the default) or vm.
581
582       Mode   Use  ascii  (the  default)  for  a  text  file,  which  will  be
583              translated between EBCDIC and ASCII as  necessary.   Use  binary
584              for non-text files.
585
586       Cr     Controls  how  Newline  characters are handled when transferring
587              Mode=ascii  files.   remove   (the   default)   strips   Newline
588              characters  in local files before transferring them to the host.
589              add adds Newline characters to  each  host  file  record  before
590              transferring  it  to  the  local  workstation.   keep  preserves
591              Newline characters when transferring a local file to the host.
592
593       Remap  Controls text translation for Mode=ascii files.  The  value  yes
594              (the  default)  causes c3270 to remap the text to ensure maximum
595              compatibility  between  the  workstation's  character  set   and
596              encoding  and  the host's EBCDIC code page.  The value no causes
597              c3270 to pass the text to or from the host  as-is,  leaving  all
598              translation to the IND$FILE program on the host.
599
600       Exist  Controls  what happens when the destination file already exists.
601              keep (the default) preserves  the  file,  causing  the  Transfer
602              action  to  fail.   replace overwrites the destination file with
603              the  source  file.   append  appends  the  source  file  to  the
604              destination file.
605
606       Recfm  Controls  the record format of files created on the host.  fixed
607              creates a file with fixed-length records.   variable  creates  a
608              file  with  variable-length  records.   undefined creates a file
609              with undefined-length  records  (TSO  hosts  only).   The  Lrecl
610              option  controls  the record length or maximum record length for
611              Recfm=fixed and Recfm=variable files, respectively.
612
613       Lrecl  Specifies the record length (or maximum record length) for files
614              created on the host.
615
616       Blksize
617              Specifies  the  block  size for files created on the host.  (TSO
618              hosts only.)
619
620       Allocation
621              Specifies  the  units  for  the  TSO   host   PrimarySpace   and
622              SecondarySpace options: tracks, cylinders or avblock.
623
624       PrimarySpace
625              Primary  allocation for a file created on a TSO host.  The units
626              are given by the Allocation option.
627
628       SecondarySpace
629              Secondary allocation for a file created  on  a  TSO  host.   The
630              units are given by the Allocation option.
631
632       BufferSize
633              Buffer  size  for  DFT-mode  transfers.   Can  range from 256 to
634              32768.  Larger values give better performance,  but  some  hosts
635              may not be able to support them.
636
637

THE PRINTTEXT ACTION

639       The PrintText produces screen snapshots in a number of different forms.
640       The default form wth no arguments sends a copy of  the  screen  to  the
641       default  printer.   A  single  argument is the command to use to print,
642       e.g., lpr.  Multiple arguments can  include  keywords  to  control  the
643       output of PrintText:
644
645       file filename
646              Save the output in a file.
647
648       html   Save the output as HTML.  This option implies file.
649
650       rtf    Save  the  output  as  RichText.  This option implies file.  The
651              font defaults to Courier New and the point size defaults  to  8.
652              These  can  be overridden by the printTextFont and printTextSize
653              resources, respectively.
654
655       string Return the output as a string.   This  can  only  be  used  from
656              scripts.
657
658       modi   Render modified fields in italics.
659
660       caption text
661              Add  the  specified  text as a caption above the output.  Within
662              text,  the  special  sequence  %T%  will  be  replaced  with   a
663              timestamp.
664
665       command command
666              Directs the output to a command.  This allows one or more of the
667              other keywords to be specified, while still sending  the  output
668              to the printer.
669
670

SCRIPTS

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

COMPOSITE CHARACTERS

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

PRINTER SUPPORT

741       c3270  supports  associated printer sessions via the pr3287(1) program.
742       The Printer action is used to start or stop a pr3287 session.
743
744       The action Printer Start starts a printer session, associated with  the
745       current LU.  (This works only if the host supports TN3270E.)
746
747       The action Printer Start lu starts a printer session, associated with a
748       specific lu.
749
750       The action Printer Stop stops a printer session.
751
752       The resource c3270.printer.command specifies the command used to  print
753       each     job;     it     defaults     to     lpr.      The     resource
754       c3270.printer.assocCommandLine specifies the command used to  start  an
755       associated printer session.  It defaults to:
756
757              pr3287 -assoc %L% -command "%C%" %P% %H%
758
759       The  resource c3270.printer.luCommandLine specifies the command used to
760       start a specific-LU printer session.  It defaults to:
761
762              pr3287 -command "%C%" %R% %P% %L%@%H%
763
764       When the printer session command is run,  the  following  substitutions
765       are made:
766
767       Token   Substitition
768       %C%     Command (value of
769               c3270.printer.command)
770       %H%     Host IP address
771       %L%     Current or specified LU
772       %P%     Proxy specification
773       %R%     Character set
774
775       See pr3287(1) for further details.
776
777       The resource c3270.printerLu controls automatic printer session  start-
778       up.   If  it is set to `.', then whenever a login session is started, a
779       printer session will automatically  be  started,  associated  with  the
780       login  session.   If  it  is set an LU name, then the automatic printer
781       session will be associated with the specified LU.
782
783

PASSTHRU

785       c3270  supports  the  Sun  telnet-passthru  service  provided  by   the
786       in.telnet-gw server.  This allows outbound telnet connections through a
787       firewall machine.  When a p: is prepended to  a  hostname,  c3270  acts
788       much  like  the  itelnet(1)  command.   It  contacts  the machine named
789       internet-gateway at  the  port  defined  in  /etc/services  as  telnet-
790       passthru  (which  defaults  to  3514).   It  then  passes the requested
791       hostname and port to the in.telnet-gw server.
792

PROXY

794       The -proxy option or the c3270.proxy resource causes  c3270  to  use  a
795       proxy  server  to  connect  to  the  host.  The syntax of the option or
796       resource is:
797              type:host[:port]
798
799       The supported values for type are:
800
801                    Proxy Type   Protocol            Default Port
802                    ──────────────────────────────────────────────
803                       http      RFC 2817 HTTP           3128
804                                 tunnel (squid)
805                     passthru    Sun in.telnet-gw        none
806                      socks4     SOCKS version 4         1080
807                      socks5     SOCKS version 5         1080
808                                 (RFC 1928)
809                      telnet     No protocol (just       none
810                                 send connect host
811                                 port)
812
813       The special types socks4a and socks5d can also be  used  to  force  the
814       proxy server to do the hostname resolution for the SOCKS protocol.
815

SCREEN SIZE SWITCHING

817       When  running  as a 3270 Model 5, c3270 can take advantage of terminals
818       that can switch between 80 and 132 column modes.
819
820       Because the curses library does not support mode switching, the  escape
821       sequences  and resulting screen dimensions must be specified explicitly
822       to c3270.  These are  specified  with  the  -altscreen  and  -defscreen
823       command-line   options,  or  the  altScreen  and  defScreen  resources.
824       -altscreen  or  altScreen  defines  the  alternate  (132-column)  mode;
825       -defscreen or defScreen defines the default (80-column) mode.
826
827       The  syntax  for  the  options  and resources is rowsxcols=init_string,
828       where rows and cols give the screen dimensions, and init_string is  the
829       escape  sequence  to  transmit to the terminal to enter that mode.  For
830       defscreen, the minimum dimensions are 24  rows  and  80  columns.   For
831       altscreen,  the minimum dimensions are 27 rows and 132 columns.  Within
832       init_string, the usual escape sequences are supported (\E  for  escape,
833       \r, \b, etc.).  For example, the init string for a 132-column xterm is:
834
835              \E[?40h\E[?3h
836
837       Note:  When  defscreen and altscreen are specified, the model number is
838       always set to 5.
839

RESOURCES

841       Certain c3270 options can be configured via resources.   Resources  are
842       defined in the file .c3270pro in the user's home directory, and by -xrm
843       options.  The definitions are similar  to  X11  resources,  and  use  a
844       similar syntax.  The resources available in c3270 are:
845
846       Resource                   Default    Option           Purpose
847       ─────────────────────────────────────────────────────────────────────────────
848       allBold                    Auto       -allbold         Display all
849                                                              characters bold
850       altScreen                             -altscreen       132-col screen
851                                                              definition
852       blankFill                  False      -set blankFill   Blank Fill mode
853       charset                    bracket    -charset         EBCDIC character
854                                                              set
855       composeMap                 latin1                      Name of
856                                                              composed-
857                                                              character map
858       cursesColorForHostColorn   (note 6)                    Color mapping
859                                                              T}T{
860                                                              cursesColorForDefault
861       defScreen                             -defscreen       80-col screen
862                                                              definition
863       dbcsCgcsgid                                            Override DBCS CGCSGID
864       dsTrace                    False      -trace           Data stream tracing
865       eof                        ^D                          NVT-mode EOF
866                                                              character
867       erase                      ^H                          NVT-mode erase
868                                                              character
869       extended                   True                        Use 3270 extended
870                                                              data stream
871       eventTrace                 False      -trace           Event tracing
872       hostsFile                             -hostsfile       Host alias/macro file
873       icrnl                      False                       Map CR to NL on NVT-
874                                                              mode input
875       inlcr                      False                       Map NL to CR in NVT-
876                                                              mode input
877       intr                       ^C                          NVT-mode interrupt
878                                                              character
879       keymap                                -keymap          Keyboard map name
880       keymap.foo                                             Definition of keymap
881                                                              foo
882
883
884       kill                       ^U                          NVT-mode kill
885                                                              character
886       lineWrap                   False      -set lineWrap    NVT line wrap mode
887       lnext                      ^V                          NVT-mode lnext
888                                                              character
889       m3279                      (note 1)   -model           3279 (color)
890                                                              emulation
891       metaEscape                 Auto                        Interpret ESC-x as
892                                                              Meta-x
893       mono                       (note 5)   -mono            Ignore terminal color
894                                                              capabilities
895       monoCase                   False      -set monoCase    Mono-case mode
896       noPrompt                   False      -noprompt        Disable command-
897                                                              prompt mode
898       numericLock                False                       Lock keyboard for
899                                                              numeric field error
900       oerrLock                   True                        Lock keyboard for
901                                                              input error
902       oversize                              -oversize        Oversize screen
903                                                              dimensions
904       port                       telnet     -port            Non-default TCP port
905       printer.*                  (note 4)                    Printer session
906                                                              config
907       printerLu                  (note 4)                    Printer session
908                                                              config
909       quit                       ^\                          NVT-mode quit
910                                                              character
911       reconnect                  False      -reconnect       Automatically
912                                                              reconnect to host
913       rprnt                      ^R                          NVT-mode reprint
914                                                              character
915       sbcsCgcsgid                                            Override SBCS CGCSGID
916       secure                     False                       Disable "dangerous"
917                                                              options
918       termName                   (note 2)   -tn              TELNET terminal type
919                                                              string
920       traceDir                   /tmp                        Directory for trace
921                                                              files
922       traceFile                  (note 3)   -tracefile       File for trace output
923       typeahead                  True                        Allow typeahead
924       werase                     ^W                          NVT-mode word-erase
925                                                              character
926
927              Note 1: m3279 defaults to True if the terminal  supports  color,
928              False  otherwise.   It  can  be  forced to False with the proper
929              -model option.
930
931              Note 2: The default terminal type string is constructed from the
932              model  number,  color emulation, and extended data stream modes.
933              E.g., a model 2 with  color  emulation  and  the  extended  data
934              stream  option  would  be  sent as IBM-3279-2-E.  Note also that
935              when TN3270E mode is used, the terminal type is always  sent  as
936              3278, but this does not affect color capabilities.
937
938              Note  3:  The  default  trace file is x3trc.pid in the directory
939              specified by the traceDir resource.
940
941              Note 4: See PRINTER SUPPORT for details.
942
943
944              Note 5: mono defaults to false if the terminal supports at least
945              8 colors and to true otherwise.
946
947              Note  6:  The  default  curses  color mappings for host colors 0
948              through 15 are: black, blue, red, magenta, green, cyan,  yellow,
949              white, black, blue, yellow, blue, green, cyan, black and white.
950
951
952              In .c3270pro, lines are continued with a backslash character.
953
954              -xrm  options  override definitions found in .c3270pro.  If more
955              than one -xrm option is given for the same  resource,  the  last
956              one on the command line is used.
957

FILES

959       /etc/ibm_hosts
960       $HOME/.c3270pro
961
962

SEE ALSO

964       x3270(1),    s3270(1),   tcl3270(1),   ibm_hosts(5),   x3270-script(1),
965       telnet(1), tn3270(1)
966       Data Stream Programmer's Reference, IBM GA23-0059
967       Character Set Reference, IBM GA27-3831
968       RFC 1576, TN3270 Current Practices
969       RFC 1646, TN3270 Extensions for LUname and Printer Selection
970       RFC 2355, TN3270 Enhancements
971

COPYRIGHTS

973       Copyright 1993-2009, Paul Mattes.
974       Copyright 2004-2005, Don Russell.
975       Copyright 2004, Dick Altenbern.
976       Copyright 1990, Jeff Sparkes.
977       Copyright 1989, Georgia Tech Research Corporation (GTRC), Atlanta, GA
978        30332.
979       All rights reserved.
980
981       Redistribution and use in source and  binary  forms,  with  or  without
982       modification,  are permitted provided that the following conditions are
983       met:
984
985
986       *      Redistributions of source code must retain the  above  copyright
987              notice, this list of conditions and the following disclaimer.
988
989       *      Redistributions   in   binary  form  must  reproduce  the  above
990              copyright notice, this list  of  conditions  and  the  following
991              disclaimer  in the documentation and/or other materials provided
992              with the distribution.
993
994       *      Neither the names of Paul Mattes, Don Russell,  Dick  Altenbern,
995              Jeff  Sparkes,  GTRC  nor the names of their contributors may be
996              used to endorse or promote products derived from  this  software
997              without specific prior written permission.
998
999
1000       THIS  SOFTWARE IS PROVIDED BY PAUL MATTES, DON RUSSELL, DICK ALTENBERN,
1001       JEFF SPARKES AND GTRC "AS IS" AND ANY EXPRESS  OR  IMPLIED  WARRANTIES,
1002       INCLUDING,   BUT   NOT   LIMITED   TO,   THE   IMPLIED   WARRANTIES  OF
1003       MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
1004       NO  EVENT  SHALL PAUL MATTES, DON RUSSELL, DICK ALTENBERN, JEFF SPARKES
1005       OR GTRC  BE  LIABLE  FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL,  SPECIAL
1006       EXEMPLARY,  OR  CONSEQUENTIAL  DAMAGES  (INCLUDING, BUT NOT LIMITED TO,
1007       PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS  OF  USE,  DATA,  OR
1008       PROFITS;  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
1009       LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,  OR  TORT  (INCLUDING
1010       NEGLIGENCE  OR  OTHERWISE)  ARISING  IN  ANY WAY OUT OF THE USE OF THIS
1011       SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1012

VERSION

1014       c3270 3.3.10ga4
1015
1016
1017
1018                                02 October 2009                       c3270(1)
Impressum