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 compatibility 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       -accepthostname spec
68              Specifies a particular hostname to accept  when  validating  the
69              name presented in the host's SSL certificate, instead of compar‐
70              ing to the name or address used to make  the  connection.   spec
71              can either be any, which disables name validation, DNS:hostname,
72              which matches a particular DNS hostname,  or  IP:address,  which
73              matches a particular numeric IPv4 or IPv6 address.
74
75       -allbold
76              Forces  all characters to be displayed in bold.  This helps with
77              PC consoles which display non-bold characters in unreadably  dim
78              colors.   All-bold  mode  is the default for color displays, but
79              not for monochrome displays.
80
81       -altscreen rowsxcols=init_string
82              Defines the dimensions and escape  sequence  for  the  alternate
83              (132-column) screen mode.  See SCREEN SIZE SWITCHING, below.
84
85       -cadir directory
86              Specifies  a  directory containing CA (root) certificates to use
87              when verifying a certificate provided by the host.
88
89       -cafile filename
90              Specifies a PEM-format file containing CA (root) certificates to
91              use when verifying a certificate provided by the host.
92
93       -cbreak
94              Causes c3270 to operate in cbreak mode, instead of raw mode.  In
95              cbreak mode, the TTY driver will properly process XOFF  and  XON
96              characters,  which  are  required  by  some terminals for proper
97              operation.  However, those characters (usually ^S  and  ^Q),  as
98              well  as  the characters for interrupt, quit, and lnext (usually
99              ^C, ^\ and ^V respectively) will be seen by c3270 only  if  pre‐
100              ceded  by  the lnext character.  The susp character (usually ^Z)
101              cannot be seen by c3270 at all.
102
103       -certfile filename
104              Specifies a file containing a  certificate  to  provide  to  the
105              host, if requested.  The default file type is PEM.
106
107       -certfiletype type
108              Specifies  the  type of the certificate file specified by -cert‐
109              file.  Type can be pem or asn1.
110
111       -chainfile filename
112              Specifies a certificate chain file in PEM format,  containing  a
113              certificate  to provide to the host if requested, as well as one
114              or more intermediate certificates and the CA certificate used to
115              sign that certificate.  If -chainfile is specified, it overrides
116              -certfile.
117
118       -charset name
119              Specifies an EBCDIC host character set.
120
121       -clear toggle
122              Sets the initial value of toggle to false.
123
124       -defaultfgbg
125              Causes c3270 to use  the  terminal's  default  foreground  color
126              instead  of  the  curses color black, and the terminal's default
127              background color instead of the curses  color  white.   This  is
128              helpful  for  emulators such as gnome-terminal whose representa‐
129              tion of a black background is a murky gray,  and  for  emulators
130              configured  to  use black text on a white background.  It is set
131              automatically if the environment variable COLORTERM  is  set  to
132              gnome-terminal.  It is available only if c3270 was compiled with
133              a version of ncurses that supports default colors, if the emula‐
134              tor  supports  default colors, and if the termcap/terminfo entry
135              indicates this capability.
136
137       -defscreen rowsxcols=init_string
138              Defines the dimensions  and  escape  sequence  for  the  default
139              (80-column) screen mode.  See SCREEN SIZE SWITCHING, below.
140
141       -devname name
142              Specifies a device name (workstation ID) for RFC 4777 support.
143
144       -hostsfile file
145              Uses file as the hosts file, which allows aliases for host names
146              and scripts to be  executed  at  login.   See  ibm_hosts(1)  for
147              details.
148
149       -im method
150              Specifies  the  name  of  the input method to use for multi-byte
151              input.  (Supported only when c3270 is compiled  with  DBCS  sup‐
152              port.)
153
154       -keyfile filename
155              Specifies  a file containing the private key for the certificate
156              file (specified via -certfile or -chainfile).  The default  file
157              type is PEM.
158
159       -keyfiletype type
160              Specifies  the  type  of the private key file specified by -key‐
161              file.  Type can be pem or asn1.
162
163       -keypasswd type:value
164              Specifies the password for  the  private  key  file,  if  it  is
165              encrypted.   The  argument can be file:filename, specifying that
166              the password is in a  file,  or  string:string,  specifying  the
167              password  on the command-line directly.  If the private key file
168              is encrypted and no -keypasswd option  is  given,  the  password
169              will be prompted for interactively.
170
171       -keymap name
172              Specifies   a   keyboard   map  to  be  found  in  the  resource
173              c3270.keymap.name or the  file  name.   See  KEYMAPS  below  for
174              details.
175
176       -km name
177              Specifies  the  local encoding method for multi-byte text.  name
178              is an encoding name recognized by the ICU  library.   (Supported
179              only  when  c3270  is  compiled with DBCS support, and necessary
180              only when c3270 cannot figure it out from the locale.)
181
182       -loginmacro Action(arg...) ...
183              Specifies a macro to run at login time.
184
185       -model name
186              The model of 3270 display to be emulated.  The model name is  in
187              two parts, either of which may be omitted:
188
189              The  first part is the base model, which is either 3278 or 3279.
190              3278 specifies a monochrome (green on black) 3270 display;  3279
191              specifies a color 3270 display.
192
193              The  second part is the model number, which specifies the number
194              of rows and columns.  Model 4 is the default.
195
196                            Model Number   Columns   Rows
197                            ──────────────────────────────
198
199                                 2           80       24
200                                 3           80       32
201                                 4           80       43
202                                 5           132      27
203
204              Note: Technically, there is no such 3270 display as a 3279-4  or
205              3279-5, but most hosts seem to work with them anyway.
206
207              The  default  model  for  a  color  display  is  3279-4.   For a
208              monochrome display, it is 3278-4.
209
210       -mono  Prevents c3270 from using color, ignoring any color capabilities
211              reported by the terminal.
212
213       -noprompt
214              An alias for -secure.
215
216       -oversize colsxrows
217              Makes  the  screen  larger than the default for the chosen model
218              number.   This  option  has  effect  only  in  combination  with
219              extended data stream support (controlled by the "c3270.extended"
220              resource), and  only  if  the  host  supports  the  Query  Reply
221              structured  field.   The  number  of  columns  multiplied by the
222              number of rows must not exceed 16383 (3fff hex),  the  limit  of
223              14-bit 3270 buffer addressing.
224
225              It can also be specified as auto, which causes c3270 to fill the
226              entire terminal or console window.
227
228       -port n
229              Specifies a different TCP port to connect to.  n can be  a  name
230              from  /etc/services  like  telnet,  or  a  number.   This option
231              changes the default port number used for all connections.   (The
232              positional parameter affects only the initial connection.)
233
234       -proxy type:host[:port]
235              Causes  c3270  to  connect  via  the specified proxy, instead of
236              using a direct connection.  The host can be  an  IP  address  or
237              hostname.   The optional port can be a number or a service name.
238              For a list of supported proxy types, see PROXY below.
239
240       -printerlu luname
241              Causes c3270 to automatically start a  pr3287  printer  session.
242              If  luname  is  ".", then the printer session will be associated
243              with the interactive terminal session (this  requires  that  the
244              host  support  TN3270E).   Otherwise,  the  value is used as the
245              explicit LU name to associate with the printer session.
246
247       -reconnect
248              Causes c3270 to automatically reconnect to the host if  it  ever
249              disconnects.   This  option  has  effect  only  if a hostname is
250              specified on the command line.
251
252       -rv    Switches c3270 from a white-on-black display to a black-on-white
253              display.
254
255       -sl n  Specifies  that n lines should be saved for scrolling back.  The
256              default is 4096.
257
258       -scriptport port
259              Causes c3270 to listen for scripting connections  on  local  TCP
260              port  port.  Note that this is the only way to do peer scripting
261              on c3270.
262
263       -secure
264              Disables the interactive c3270> prompt.  When used,  a  hostname
265              must be provided on the command line.
266
267       -selfsignedok
268              When  verifying  a  host  SSL  certificate, allow it to be self-
269              signed.
270
271       -set toggle
272              Sets the initial value of toggle to true.
273
274       -socket
275              Causes the emulator to  create  a  Unix-domain  socket  when  it
276              starts,  for  use  by  script  processes to send commands to the
277              emulator.  The socket is named /tmp/x3sck.pid.  The -p option of
278              x3270if causes it to use this socket, instead of pipes specified
279              by environment variables.
280
281       -tn name
282              Specifies the terminal name to be transmitted  over  the  telnet
283              connection.   The default name is IBM-model_name-E, for example,
284              IBM-3279-4-E  for  a  color  display,  or  IBM-3278-4-E  for   a
285              monochrome display.
286
287              Some  hosts  are confused by the -E suffix on the terminal name,
288              and will ignore the extra screen area on  models  3,  4  and  5.
289              Prepending   an   s:   on   the   hostname,   or   setting   the
290              "c3270.extended" resource to "false", removes the  -E  from  the
291              terminal name when connecting to such hosts.
292
293              The  name  can  also  be  specified  with  the  "c3270.termName"
294              resource.
295
296       -trace Turns on data stream and event tracing at startup.  The  default
297              trace file name is /tmp/x3trc.
298
299       -tracefile file
300              Specifies  a file to save data stream and event traces into.  If
301              the name starts with `>>', data will be appended to the file.
302
303       -tracefilesize size
304              Places a limit on the size of a trace file.  If this  option  is
305              not specified, or is specified as 0 or none, the trace file size
306              will be unlimited.  The minimum size is 64 Kbytes.  The value of
307              size can have a K or M suffix, indicating kilobytes or megabytes
308              respectively.  When the trace file reaches the  size  limit,  it
309              will be renamed with a `-' appended and a new file started.
310
311       -user name
312              Specifies the user name for RFC 4777 support.
313
314       -v     Display the version and build options for c3270 and exit.
315
316       -verifycert
317              For SSL or SSL/TLS connections, verify the host certificate, and
318              do not allow  the  connection  to  complete  unless  it  can  be
319              validated.
320
321       -xrm "c3270.resource: value"
322              Sets  the  value  of  the  named  resource  to value.  Resources
323              control  less  common  c3270  options,  and  are  defined  under
324              RESOURCES below.
325

STATUS LINE

327       If the terminal that c3270 is running on has at least one more row that
328       the 3270 model requires (e.g., 25 rows  for  a  model  2),  c3270  will
329       display  a  status  line.   The c3270 status line contains a variety of
330       information.  From left to right, the fields are:
331
332       comm status
333              The first symbol is always a 4.  If c3270 is  in  TN3270E  mode,
334              the  second symbol is a B; otherwise it is an A.  If c3270 is in
335              SSCP-LU mode, the third symbol is an S.  Otherwise it is blank.
336
337       keyboard lock
338              If the keyboard is locked, an "X" symbol  and  a  message  field
339              indicate the reason for the keyboard lock.
340
341       typeahead
342              The  letter "T" indicates that one or more keystrokes are in the
343              typeahead buffer.
344
345       temporary keymap
346              The letter "K" indicates that a temporary keymap is in effect.
347
348       reverse
349              The letter "R" indicates that the keyboard is in  reverse  field
350              entry mode.
351
352       insert mode
353              The letter "I" indicates that the keyboard is in insert mode.
354
355       printer session
356              The letter "P" indicates that a pr3287 session is active.
357
358       secure connection
359              A  green letter "S" indicates that the connection is secured via
360              SSL/TLS.
361
362       LU name
363              The LU name associated with the session, if there is one.
364
365       cursor position
366              The cursor row and column are optionally displayed, separated by
367              a "/".
368
369

ACTIONS

371       Here  is  a  complete  list  of  basic  c3270 actions.  Script-specific
372       actions are described on the x3270-script(1) manual page.
373
374       Actions marked with an asterisk (*) may block, sending data to the host
375       and possibly waiting for a response.
376
377           *Attn                            attention key
378           BackSpace                        move cursor left (or send
379                                            ASCII BS)
380           BackTab                          tab to start of previous input
381                                            field
382           CircumNot                        input "^" in NVT mode, or
383                                            "notsign" in 3270 mode
384           *Clear                           clear screen
385           Compose                          next two keys form a special
386                                            symbol
387           *Connect(host)                   connect to host
388           *CursorSelect                    Cursor Select AID
389           Delete                           delete character under cursor
390                                            (or send ASCII DEL)
391           DeleteField                      delete the entire field
392           DeleteWord                       delete the current or previous
393                                            word
394           *Disconnect                      disconnect from host
395           Down                             move cursor down
396           Dup                              duplicate field
397           *Enter                           Enter AID (or send ASCII CR)
398           Erase                            erase previous character (or
399                                            send ASCII BS)
400           EraseEOF                         erase to end of current field
401           EraseInput                       erase all input fields
402           Escape                           escape to c3270> prompt
403
404           Execute(cmd)                     execute a command in a shell
405           FieldEnd                         move cursor to end of field
406           FieldMark                        mark field
407           HexString(hex_digits)            insert control-character
408                                            string
409           Home                             move cursor to first input
410                                            field
411           Insert                           set insert mode
412           *Interrupt                       send TELNET IP to host
413           Keypad                           Display pop-up keypad
414           Key(keysym)                      insert key keysym
415           Key(0xxx)                        insert key with character code
416                                            xx
417           Left                             move cursor left
418           Left2                            move cursor left 2 positions
419           Menu                             Display menu bar
420           MonoCase                         toggle uppercase-only mode
421           MoveCursor(row, col)             move cursor to (row,col)
422           Newline                          move cursor to first field on
423                                            next line (or send ASCII LF)
424           NextWord                         move cursor to next word
425           *PA(n)                           Program Attention AID (n from
426                                            1 to 3)
427           *PF(n)                           Program Function AID (n from 1
428                                            to 24)
429           PreviousWord                     move cursor to previous word
430           Printer(Start[,lu]|Stop)         start or stop printer session
431           PrintText(command)               print screen text on printer
432           Quit                             exit c3270
433           Redraw                           redraw window
434           Reset                            reset locked keyboard
435           Right                            move cursor right
436           Right2                           move cursor right 2 positions
437           *Script(command[,arg...])        run a script
438           Scroll(Forward|Backward)         scroll screen
439           *String(string)                  insert string (simple macro
440                                            facility)
441           *SysReq                          System Request AID
442           Tab                              move cursor to next input
443                                            field
444           Toggle(option[,set|clear])       toggle an option
445           ToggleInsert                     toggle insert mode
446           ToggleReverse                    toggle reverse-input mode
447           *Transfer(option=value...)       file transfer
448           Up                               move cursor up
449           ignore                           do nothing
450
451       Any of the above actions may be entered at  the  c3270>  prompt;  these
452       commands  are also available for use in keymaps (see KEYMAPS).  Command
453       names  are  case-insensitive.   Parameters  can   be   specified   with
454       parentheses and commas, e.g.:
455              PF(1)
456       or with spaces, e.g.:
457              PF 1
458       Parameters can be quoted with double-quote characters, to allow spaces,
459       commas, and parentheses to be used.
460
461       c3270 also supports the following interactive commands:
462
463       Help   Displays a list of available commands.
464
465       ScreenTrace
466              Turns screen tracing (saving screen images to a file) on or off.
467              The  command  screentrace on enables screen tracing; the command
468              screentrace off disables  it.   After  on,  a  filename  may  be
469              specified   to   override   the   default  trace  file  name  of
470              /tmp/x3scr.pid.  The keyaord on can  also  be  followed  by  the
471              keyword  printer  and an optional print command to direct screen
472              traces directly to the printer.
473
474       Show   Displays statistics and settings.
475
476       Trace  Turns tracing on or off.  The  command  trace  on  enables  data
477              stream  and  keyboard  event  tracing;  the  command  trace  off
478              disables it.  The qualifier data or keyboard  can  be  specified
479              before on or off to enable or disable a particular trace.  After
480              on, a filename may be specified to override  the  default  trace
481              file name of /tmp/x3trc.pid.
482
483       Note  that  certain  parameters  to c3270 actions (such as the names of
484       files and keymaps) are subject to substitutions:
485
486       The character ~ at the beginning of  a  string  is  replaced  with  the
487       user's  home  directory.   A  ~  character  followed  by  a username is
488       replaced with that user's home directory.
489
490       Environment variables are substituted using the Unix  shell  convention
491       of $name or ${name}.
492
493       Two special pseudo-environment variables are supported. ${TIMESTAMP} is
494       replaced with a microsecond-resolution timestamp; ${UNIQUE} is replaced
495       with  a  string  guaranteed  to  make a unique filename (the process ID
496       optionally followed by a dash and a string  of  digits).  ${UNIQUE}  is
497       used to form trace file names.
498

KEYMAPS

500       The  -keymap  option or the c3270.keymap resource allow a custom keymap
501       to  be  specified.   If  the  option  -keymap  xxx  is  given  (or  the
502       c3270.keymap  resource  has  the  value  xxx),  c3270  will  look for a
503       resource named c3270.keymap.xxx.  If no resource definition  is  found,
504       it will look for a file named xxx.
505
506       Multiple  keymaps  may  be  specified  be  separating  their names with
507       commas.  Definitions  in  later  keymaps  supercede  those  in  earlier
508       keymaps.
509
510       In  addition,  separate  keymaps may be defined that apply only in 3270
511       mode   or   NVT   mode.    For   example,   the   resource   definition
512       c3270.keymap.xxx.nvt or the file xxx.nvt will augment the definition of
513       keymap  xxx  in  NVT  mode.    Similarly,   the   resource   definition
514       c3270.keymap.xxx.3270  or the file xxx.3270 will augment the definition
515       of keymap xxx in 3270 mode.
516
517       Each line (rule) in a  keymap  specifies  actions  to  perform  when  a
518       particular  key  or sequence of keys is pressed.  Keymap rules have the
519       following syntax:
520
521              [Meta][Ctrl]<Key>key...: action[(param[,...])] ...
522
523       Here is a sample keymap definition from a file:
524
525              ! Lines beginning with ! are ignored and can
526              ! occur anywhere.
527              ! Definition of keymap xxx
528              !  When Alt-c is pressed, clear the screen.
529              Alt<Key>c: Clear()
530              !  When PageUp is pressed, send PF7 to the host.
531              <Key>PPAGE: PF(7)
532              !  When Ctrl-a is pressed, then F1, send PF13
533              !  to the host.
534              Ctrl<Key>a <Key>F1: PF(13)
535
536       Here is the same definition as a resource:
537
538              ! Lines beginning with ! are ignored, but NOT
539              ! within a definition.
540              ! Note that the \ is required at the end of the
541              ! first line, and \n\ is
542              ! required at the end of every other line except
543              ! the last.
544              ! Definition of keymap xxx
545              c3270.keymap.xxx: \
546               Alt<Key>c: Clear() \n\
547               <Key>PPAGE: PF(7) \n\
548               Ctrl<Key>A <Key>F1: PF(13)
549
550       The optional Alt or Ctrl modifiers specify that the Alt and  Ctrl  keys
551       are  pressed along with the specified key, respectively.  Key is either
552       an ISO 8859-1 symbol name, such as equal for `=' and a for  `a',  or  a
553       symbolic  ncurses  key  name,  such  as  UP.   More than one key can be
554       specified, indicating that a sequence of keys must be pressed in  order
555       for  the  rule to be matched.  The action is an action from the ACTIONS
556       list above.  More than one  action  may  be  specified;  they  will  be
557       executed in order.
558
559       Keymap  entries  are  case-sensitive and modifier-specific.  This means
560       that a keymap for the b key will match only a lowercase b.  Actions for
561       uppercase B, or for Alt-B, must be specified separately.
562
563       The base keymap is:
564
565       Key                     Action
566       ─────────────────────────────────────────
567       Ctrl<Key>]              Escape
568       Ctrl<Key>a Ctrl<Key>a   Key(0x01)
569       Ctrl<Key>a Ctrl<Key>]   Key(0x1d)
570       Ctrl<Key>a <Key>Tab     BackTab
571       Ctrl<Key>a <Key>c       Clear
572       Ctrl<Key>a <Key>e       Escape
573       Ctrl<Key>a <Key>r       Reset
574       Ctrl<Key>a <Key>k       Keypad
575       Ctrl<Key>a <Key>l       Redraw
576       Ctrl<Key>a <Key>m       Compose
577       Ctrl<Key>a <Key>n       Menu
578       Ctrl<Key>a <Key>p       PrintText
579       Ctrl<Key>a <Key>^       Key(notsign)
580       Ctrl<Key>k              Keypad
581       Ctrl<Key>n              Menu
582       <Key>UP                 Up
583       <Key>DOWN               Down
584       <Key>LEFT               Left
585       <Key>RIGHT              Right
586       <Key>F(n)               PF(n)
587       Ctrl<Key>a <Key>F(n)    PF(n+12)
588       Ctrl<Key>a <Key>1       PA(1)
589       Ctrl<Key>a <Key>2       PA(2)
590       Ctrl<Key>a <Key>3       PA(3)
591       <Key>PPAGE              Scroll(Backward)
592       <Key>NPAGE              Scroll(Forward)
593
594       The base 3270-mode keymap adds:
595
596       Key              Action
597       ──────────────────────────────
598       Ctrl<Key>c       Clear
599       Ctrl<Key>d       Dup
600       Ctrl<Key>f       FieldMark
601       Ctrl<Key>i       Tab
602       Ctrl<Key>l       Redraw
603       Ctrl<Key>r       Reset
604       Ctrl<Key>u       DeleteField
605       <Key>BackSpace   BackSpace
606       <Key>Return      Enter
607       <Key>Tab         Tab
608       <Key>Linefeed    Newline
609       <Key>BACKSPACE   BackSpace
610
611       <Key>DC          Delete
612       <Key>HOME        Home
613       <Key>IC          ToggleInsert
614

THE META OR ALT KEY

616       Some  keyboards do not have a Meta key.  Instead, they have an Alt key.
617       Sometimes this key acts as a proper Meta key, that is, it is a modifier
618       key that sets the high-order bit (0x80) in the code that is transmitted
619       for each key.  Other keyboards send a two-character sequence  when  the
620       Alt  key  is  pressed  with  another  key: the Escape character (0x1b),
621       followed by the code for the other key.
622
623       The resource c3270.metaEscape and the termcap km attribute control  how
624       c3270  will interpret these sequences.  When c3270.metaEscape is set to
625       true, or when c3270.metaEscape is  set  to  auto  and  the  termcap  km
626       attribute  is set, the keyboard is assumed to have a separate Meta key.
627       The Escape key can be used as an ordinary data key and has  no  special
628       meaning.
629
630       When  c3270.metaEscape  is set to true, or when c3270.metaEscape is set
631       to auto and the termcap km  attribute  is  not  set,  the  keyboard  is
632       assumed  to  use  the Escape character as a prefix to indicate that the
633       following character is supposed to have the high-order bit  set.   When
634       c3270  sees  an  Escape  character  from  the keyboard, it sets a short
635       timeout.  If another character arrives before the timeout expires, then
636       c3270  will  combine  the two characters, setting the high-order bit of
637       the second.  In an event trace file, the combined character  is  listed
638       as  derived.   In  a  keymap,  only  the combined character or the Meta
639       prefix may be used.  The Escape key can still be used  by  itself,  but
640       only if there is a short pause before pressing another key.
641
642       The default value for c3270.metaEscape is auto.
643

FILE TRANSFER

645       The  Transfer  action  implements  IND$FILE file transfer.  This action
646       requires that the IND$FILE program be installed on the  IBM  host,  and
647       that  the  3270  cursor be located in a field that will accept a TSO or
648       VM/CMS command.
649
650       The Transfer action can be  entered  at  the  command  prompt  with  no
651       parameters,  which  will  cause it to prompt interactively for the file
652       names and options.  It can also be invoked with  parameters  to  define
653       the entire transfer.
654
655       Because  of the complexity and number of options for file transfer, the
656       parameters to the Transfer action take the unique form of option=value,
657       and  can  appear  in any order.  Note that if the value contains spaces
658       (such as a VM/CMS file name), then the entire parameter must be quoted,
659       e.g., "HostFile=xxx foo a".  The options are:
660
661       Option           Required?   Default   Other Values
662       ────────────────────────────────────────────────────────
663       Direction           No       receive   send
664       HostFile            Yes
665       LocalFile           Yes
666       Host                No       tso       vm, cics
667       Mode                No       ascii     binary
668       Cr                  No       remove    add, keep
669       Remap               No       yes       no
670       Exist               No       keep      replace, append
671       Recfm               No                 fixed, variable,
672                                              undefined
673       Lrecl               No
674       Blksize             No
675       Allocation          No                 tracks,
676                                              cylinders,
677                                              avblock
678       PrimarySpace        No
679
680       SecondarySpace      No
681       BufferSize          No       4096
682
683       The option details are as follows.
684
685       Direction
686              send to send a file to the host, receive to receive a file  from
687              the host.
688
689       HostFile
690              The name of the file on the host.
691
692       LocalFile
693              The name of the file on the local workstation.
694
695       Host   The  type  of  host  (which  dictates  the  form of the IND$FILE
696              command): tso (the default), vm or cics.
697
698       Mode   Use  ascii  (the  default)  for  a  text  file,  which  will  be
699              translated  between  EBCDIC  and ASCII as necessary.  Use binary
700              for non-text files.
701
702       Cr     Controls how Newline characters are  handled  when  transferring
703              Mode=ascii   files.    remove   (the   default)  strips  Newline
704              characters in local files before transferring them to the  host.
705              add  adds  Newline  characters  to  each host file record before
706              transferring  it  to  the  local  workstation.   keep  preserves
707              Newline characters when transferring a local file to the host.
708
709       Remap  Controls  text  translation for Mode=ascii files.  The value yes
710              (the default) causes c3270 to remap the text to  ensure  maximum
711              compatibility   between  the  workstation's  character  set  and
712              encoding and the host's EBCDIC code page.  The value  no  causes
713              c3270  to  pass  the text to or from the host as-is, leaving all
714              translation to the IND$FILE program on the host.
715
716       Exist  Controls what happens when the destination file already  exists.
717              keep  (the  default)  preserves  the  file, causing the Transfer
718              action to fail.  replace overwrites the  destination  file  with
719              the  source  file.   append  appends  the  source  file  to  the
720              destination file.
721
722       Recfm  Controls the record format of files created on the  host.   (TSO
723              and  VM  hosts  only.)   fixed  creates a file with fixed-length
724              records.  variable creates a file with variable-length  records.
725              undefined  creates  a  file  with  undefined-length records (TSO
726              hosts only).  The Lrecl option controls  the  record  length  or
727              maximum  record length for Recfm=fixed and Recfm=variable files,
728              respectively.
729
730       Lrecl  Specifies the record length (or maximum record length) for files
731              created on the host.  (TSO and VM hosts only.)
732
733       Blksize
734              Specifies  the  block  size for files created on the host.  (TSO
735              and VM hosts only.)
736
737       Allocation
738              Specifies the units  for  the  PrimarySpace  and  SecondarySpace
739              options: tracks, cylinders or avblock. (TSO hosts only.)
740
741       PrimarySpace
742              Primary  allocation  for  a  file,  The  units  are given by the
743              Allocation option. (TSO hosts only.)
744
745       SecondarySpace
746              Secondary allocation for a file.  The units  are  given  by  the
747              Allocation option. (TSO hosts only.)
748
749       BufferSize
750              Buffer  size  for  DFT-mode  transfers.   Can  range from 256 to
751              32768.  Larger values give better performance,  but  some  hosts
752              may not be able to support them.
753
754

THE PRINTTEXT ACTION

756       The PrintText produces screen snapshots in a number of different forms.
757       The default form wth no arguments sends a copy of  the  screen  to  the
758       default  printer.   A  single  argument is the command to use to print,
759       e.g., lpr.
760
761       Multiple arguments can  include  keywords  to  control  the  output  of
762       PrintText:
763
764       file filename
765              Save the output in a file.
766
767       html   Save the output as HTML.  This option implies file.
768
769       rtf    Save  the  output  as  RichText.  This option implies file.  The
770              font defaults to Courier New and the point size defaults  to  8.
771              These  can  be overridden by the printTextFont and printTextSize
772              resources, respectively.
773
774       string Return the output as a string.   This  can  only  be  used  from
775              scripts.
776
777       modi   Render modified fields in italics.
778
779       caption text
780              Add  the  specified  text as a caption above the output.  Within
781              text,  the  special  sequence  %T%  will  be  replaced  with   a
782              timestamp.
783
784       command command
785              Directs the output to a command.  This allows one or more of the
786              other keywords to be specified, while still sending  the  output
787              to the printer.
788
789

SCRIPTS

791       There are several types of script functions available.
792
793       The String Action
794              The  simplest  method  for  scripting is provided via the String
795              action.  The arguments to String are one or  more  double-quoted
796              strings  which  are  inserted  directly  as  if  typed.   The  C
797              backslash conventions are honored as follows.  (Entries marked *
798              mean  that  after  sending  the AID code to the host, c3270 will
799              wait  for  the  host  to  unlock  the  keyboard  before  further
800              processing the string.)
801
802              \b       Left
803              \exxxx   EBCDIC character in hex
804              \f       Clear*
805              \n       Enter*
806              \pan     PA(n)*
807              \pfnn    PF(nn)*
808              \r       Newline
809              \t       Tab
810              \T       BackTab
811              \uxxxx   Unicode character in hex
812              \xxxxx   Unicode character in hex
813
814              Note that the numeric values for the \e, \u and \x sequences can
815              be abbreviated to 2 digits.  Note also that EBCDIC codes greater
816              than  255  and  some  Unicode  character  codes  represent  DBCS
817              characters, which will work only if c3270  is  built  with  DBCS
818              support and the host allows DBCS input in the current field.
819
820              An example keymap entry would be:
821              Meta<Key>p: String("probs clearrdr\n")
822
823              Note:  The  strings  are  in  ASCII  and converted to EBCDIC, so
824              beware of inserting control codes.
825
826              There is also an alternate form of the String action, HexString,
827              which  is  used  to  enter  non-printing  data.  The argument to
828              HexString is a string of hexadecimal digits, two per  character.
829              A  leading  0x or 0X is optional.  In 3270 mode, the hexadecimal
830              data represent EBCDIC characters, which  are  entered  into  the
831              current  field.   In  NVT  mode,  the hexadecimal data represent
832              ASCII characters, which are sent directly to the host.
833
834       The Script Action
835              This action causes c3270 to start  a  child  process  which  can
836              execute c3270 actions.  Standard input and output from the child
837              process are piped back to c3270.  The  Script  action  is  fully
838              documented in x3270-script(1).
839

COMPOSITE CHARACTERS

841       c3270  allows the direct entry of accented letters and special symbols.
842       Pressing and releasing the "Compose" key, followed by two  other  keys,
843       causes  entry  of  the  symbol  combining those two keys.  For example,
844       "Compose" followed by the "C" key and the "," (comma) key,  enters  the
845       "C-cedilla"  symbol.   A  C  on  the  status  line  indicates a pending
846       composite character.
847
848       The mappings between these pairs of ordinary keys and the symbols  they
849       represent  is  controlled  by the "c3270.composeMap" resource; it gives
850       the  name  of  the  map  to  use.   The  maps  themselves   are   named
851       "c3270.composeMap.name".  The default is "latin1", which gives mappings
852       for most of the symbols in the ISO 8859-1 Latin-1  character  set  that
853       are not in the 7-bit ASCII character set.
854
855       Note:  The default keymap defines Meta<Key>m as the "Compose" key.  You
856       may set up your own "Compose" key with a keymap that  maps  some  other
857       keysym onto the Compose action.
858

PRINTER SUPPORT

860       c3270  supports  associated printer sessions via the pr3287(1) program.
861       The Printer action is used to start or stop a pr3287 session.
862
863       The action Printer Start starts a printer session, associated with  the
864       current LU.  (This works only if the host supports TN3270E.)
865
866       The action Printer Start lu starts a printer session, associated with a
867       specific lu.
868
869       The action Printer Stop stops a printer session.
870
871       The resource c3270.printer.command specifies the command used to  print
872       each     job;     it     defaults     to     lpr.      The     resource
873       c3270.printer.assocCommandLine specifies the command used to  start  an
874       associated printer session.  It defaults to:
875
876              pr3287 -assoc %L% -command "%C%" %P% %H%
877
878       The  resource c3270.printer.luCommandLine specifies the command used to
879       start a specific-LU printer session.  It defaults to:
880
881              pr3287 -command "%C%" %R% %P% %L%@%H%
882
883       When the printer session command is run,  the  following  substitutions
884       are made:
885
886       Token   Substitition
887       %C%     Command (value of
888               c3270.printer.command)
889       %H%     Host IP address
890       %L%     Current or specified LU
891       %P%     Proxy specification
892       %R%     Character set
893
894       See pr3287(1) for further details.
895
896       The resource c3270.printerLu controls automatic printer session  start-
897       up.   If  it is set to `.', then whenever a login session is started, a
898       printer session will automatically  be  started,  associated  with  the
899       login  session.   If  it  is set an LU name, then the automatic printer
900       session will be associated with the specified LU.
901
902

PASSTHRU

904       c3270  supports  the  Sun  telnet-passthru  service  provided  by   the
905       in.telnet-gw server.  This allows outbound telnet connections through a
906       firewall machine.  When a p: is prepended to  a  hostname,  c3270  acts
907       much  like  the  itelnet(1)  command.   It  contacts  the machine named
908       internet-gateway at  the  port  defined  in  /etc/services  as  telnet-
909       passthru  (which  defaults  to  3514).   It  then  passes the requested
910       hostname and port to the in.telnet-gw server.
911

PROXY

913       The -proxy option or the c3270.proxy resource causes  c3270  to  use  a
914       proxy  server  to  connect  to  the  host.  The syntax of the option or
915       resource is:
916              type:host[:port]
917
918       The supported values for type are:
919
920                    Proxy Type   Protocol            Default Port
921                    ──────────────────────────────────────────────
922                       http      RFC 2817 HTTP           3128
923                                 tunnel (squid)
924                     passthru    Sun in.telnet-gw        none
925                      socks4     SOCKS version 4         1080
926                      socks5     SOCKS version 5         1080
927                                 (RFC 1928)
928                      telnet     No protocol (just       none
929                                 send connect host
930                                 port)
931
932       The special types socks4a and socks5d can also be  used  to  force  the
933       proxy server to do the hostname resolution for the SOCKS protocol.
934

SCREEN SIZE SWITCHING

936       When  running  as a 3270 Model 5, c3270 can take advantage of terminals
937       that can switch between 80 and 132 column modes.
938
939       Because the curses library does not support mode switching, the  escape
940       sequences  and resulting screen dimensions must be specified explicitly
941       to c3270.  These are  specified  with  the  -altscreen  and  -defscreen
942       command-line   options,  or  the  altScreen  and  defScreen  resources.
943       -altscreen  or  altScreen  defines  the  alternate  (132-column)  mode;
944       -defscreen or defScreen defines the default (80-column) mode.
945
946       The  syntax  for  the  options  and resources is rowsxcols=init_string,
947       where rows and cols give the screen dimensions, and init_string is  the
948       escape  sequence  to  transmit to the terminal to enter that mode.  For
949       defscreen, the minimum dimensions are 24  rows  and  80  columns.   For
950       altscreen,  the minimum dimensions are 27 rows and 132 columns.  Within
951       init_string, the usual escape sequences are supported (\E  for  escape,
952       \r, \b, etc.).  For example, the init string for a 132-column xterm is:
953
954              \E[?40h\E[?3h
955
956       Note:  When  defscreen and altscreen are specified, the model number is
957       always set to 5.
958

RESOURCES

960       Certain c3270 options can be configured via resources.   Resources  are
961       defined in the file .c3270pro in the user's home directory, and by -xrm
962       options.  The definitions are similar  to  X11  resources,  and  use  a
963       similar syntax.  The resources available in c3270 are:
964
965       Resource                  Default    Option           Purpose
966       ───────────────────────────────────────────────────────────────────────
967       allBold                   Auto       -allbold         Display all
968                                                             characters bold
969       altScreen                            -altscreen       132-col screen
970                                                             definition
971       blankFill                 False      -set blankFill   Blank Fill mode
972       charset                   bracket    -charset         EBCDIC character
973                                                             set
974       composeMap                latin1                      Name of
975                                                             composed-
976                                                             character map
977       cursesColor‐              (note 6)                    Color mapping
978       ForHostColorn
979       cursesColor‐              green                       Default color
980       ForDefault                                            mapping
981       cursesColor‐              red                         Default color
982       ForIntensified                                        mapping
983       cursesColor‐              blue                        Default color
984       ForProtected                                          mapping
985       cursesColor‐              white                       Default color
986       ForProtectedIntensified                               mapping
987       cursesKeymap              True                        Set curses
988                                                             keymap option
989       defScreen                            -defscreen       80-col screen
990                                                             definition
991       dbcsCgcsgid                                           Override DBCS
992                                                             CGCSGID
993       dsTrace                   False      -trace           Data stream
994                                                             tracing
995       eof                       ^D                          NVT-mode EOF
996                                                             character
997       erase                     ^H                          NVT-mode erase
998                                                             character
999       extended                  True                        Use 3270
1000                                                             extended data
1001                                                             stream
1002       eventTrace                False      -trace           Event tracing
1003       hostsFile                            -hostsfile       Host alias/macro
1004                                                             file
1005       icrnl                     False                       Map CR to NL on
1006                                                             NVT-mode input
1007       inlcr                     False                       Map NL to CR in
1008                                                             NVT-mode input
1009       intr                      ^C                          NVT-mode
1010                                                             interrupt
1011                                                             character
1012       keymap                               -keymap          Keyboard map
1013                                                             name
1014       keymap.foo                                            Definition of
1015                                                             keymap foo
1016       kill                      ^U                          NVT-mode kill
1017                                                             character
1018       lineWrap                  False      -set lineWrap    NVT line wrap
1019                                                             mode
1020       lnext                     ^V                          NVT-mode lnext
1021                                                             character
1022       m3279                     (note 1)   -model           3279 (color)
1023                                                             emulation
1024
1025       metaEscape                Auto                        Interpret ESC-x
1026                                                             as Meta-x
1027       mono                      (note 5)   -mono            Ignore terminal
1028                                                             color
1029                                                             capabilities
1030       monoCase                  False      -set monoCase    Mono-case mode
1031       noPrompt                  False      -noprompt        Disable command-
1032                                                             prompt mode
1033       numericLock               False                       Lock keyboard
1034                                                             for numeric
1035                                                             field error
1036       oerrLock                  True                        Lock keyboard
1037                                                             for input error
1038       oversize                             -oversize        Oversize screen
1039                                                             dimensions
1040       port                      telnet     -port            Non-default TCP
1041                                                             port
1042       printer.*                 (note 4)                    Printer session
1043                                                             config
1044       printerLu                 (note 4)                    Printer session
1045                                                             config
1046       quit                      ^\                          NVT-mode quit
1047                                                             character
1048       reconnect                 False      -reconnect       Automatically
1049                                                             reconnect to
1050                                                             host
1051       rprnt                     ^R                          NVT-mode reprint
1052                                                             character
1053       sbcsCgcsgid                                           Override SBCS
1054                                                             CGCSGID
1055       secure                    False                       Disable
1056                                                             "dangerous"
1057                                                             options
1058       termName                  (note 2)   -tn              TELNET terminal
1059                                                             type string
1060       traceDir                  /tmp                        Directory for
1061                                                             trace files
1062       traceFile                 (note 3)   -tracefile       File for trace
1063                                                             output
1064       typeahead                 True                        Allow typeahead
1065       werase                    ^W                          NVT-mode word-
1066                                                             erase character
1067
1068              Note  1:  m3279 defaults to True if the terminal supports color,
1069              False otherwise.  It can be forced  to  False  with  the  proper
1070              -model option.
1071
1072              Note 2: The default terminal type string is constructed from the
1073              model number, color emulation, and extended data  stream  modes.
1074              E.g.,  a  model  2  with  color  emulation and the extended data
1075              stream option would be sent as  IBM-3279-2-E.   Note  also  that
1076              when  TN3270E  mode is used, the terminal type is always sent as
1077              3278, but this does not affect color capabilities.
1078
1079              Note 3: The default trace file is  x3trc.pid  in  the  directory
1080              specified by the traceDir resource.
1081
1082              Note 4: See PRINTER SUPPORT for details.
1083
1084
1085              Note 5: mono defaults to false if the terminal supports at least
1086              8 colors and to true otherwise.
1087
1088              Note 6: The default curses color  mappings  for  host  colors  0
1089              through  15 are: black, blue, red, magenta, green, cyan, yellow,
1090              white, black, blue, yellow, blue, green, cyan, black and white.
1091
1092
1093       In .c3270pro, lines are continued with a backslash character.
1094
1095       -xrm options override definitions found in .c3270pro.  If more than one
1096       -xrm option is given for the same resource, the last one on the command
1097       line is used.
1098

FILES

1100       /usr/local/lib/x3270/ibm_hosts
1101       $HOME/.c3270pro
1102
1103

SEE ALSO

1105       pr3287(1), s3270(1), x3270-script(1), x3270(1), tcl3270(1),  telnet(1),
1106       tn3270(1)
1107       Data Stream Programmer's Reference, IBM GA23-0059
1108       Character Set Reference, IBM GA27-3831
1109       RFC 1576, TN3270 Current Practices
1110       RFC 1646, TN3270 Extensions for LUname and Printer Selection
1111       RFC 2355, TN3270 Enhancements
1112

COPYRIGHTS

1114       Copyright 1993-2014, Paul Mattes.
1115       Copyright 2004-2005, Don Russell.
1116       Copyright 2004, Dick Altenbern.
1117       Copyright 1990, Jeff Sparkes.
1118       Copyright 1989, Georgia Tech Research Corporation (GTRC), Atlanta, GA
1119        30332.
1120       All rights reserved.
1121
1122       Redistribution  and  use  in  source  and binary forms, with or without
1123       modification, are permitted provided that the following conditions  are
1124       met:
1125
1126
1127       *      Redistributions  of  source code must retain the above copyright
1128              notice, this list of conditions and the following disclaimer.
1129
1130       *      Redistributions  in  binary  form  must  reproduce   the   above
1131              copyright  notice,  this  list  of  conditions and the following
1132              disclaimer in the documentation and/or other materials  provided
1133              with the distribution.
1134
1135       *      Neither  the  names of Paul Mattes, Don Russell, Dick Altenbern,
1136              Jeff Sparkes, GTRC nor the names of their  contributors  may  be
1137              used  to  endorse or promote products derived from this software
1138              without specific prior written permission.
1139
1140
1141       THIS SOFTWARE IS PROVIDED BY PAUL MATTES, DON RUSSELL, DICK  ALTENBERN,
1142       JEFF  SPARKES  AND  GTRC "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1143       INCLUDING,  BUT   NOT   LIMITED   TO,   THE   IMPLIED   WARRANTIES   OF
1144       MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
1145       NO EVENT SHALL PAUL MATTES, DON RUSSELL, DICK ALTENBERN,  JEFF  SPARKES
1146       OR  GTRC  BE  LIABLE  FOR  ANY  DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL
1147       EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT  NOT  LIMITED  TO,
1148       PROCUREMENT  OF  SUBSTITUTE  GOODS  OR  SERVICES; LOSS OF USE, DATA, OR
1149       PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY  OF
1150       LIABILITY,  WHETHER  IN  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
1151       NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  OF  THE  USE  OF  THIS
1152       SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1153

VERSION

1155       c3270 3.3.15ga9
1156
1157
1158
1159                                  28 May 2015                         c3270(1)
Impressum