# wpr3287 Manual Page

## Contents

> Name
> Synopsis
> Description
> Options
> Environment
> Proxy
> See Also
> Copyrights
> Version

## Name

wpr3287 - IBM host printing tool

## Synopsis

wpr3287 [options] [L:][Y:][LUname[,LUname...]@]hostname[:port][=accept]

## Description

wpr3287 opens a telnet connection to an IBM host, and emulates an IBM 3287 printer. It implements RFCs 2355 (TN3270E), 1576 (TN3270) and 1646 (LU name selection).

If the hostname is prefixed with L:, the connection will be made through an SSL/TLS tunnel. If the hostname is also prefixed with Y:, the host's SSL/TLS certificate will not be checked. wpr3287 also supports TELNET START-TLS option negotiation without any need for command-line options.

A specific LU name to use may be specified by prepending it to the hostname with an `@'. Multiple LU names to try can be separated by commas. An empty LU can be placed in the list with an extra comma.

The port to connect to defaults to telnet. This can be overridden by appending a port to the hostname with a colon `:'.

An accept name (a name to compare to the host's SSL/TLS certificate) may be specified by appending it with an equals sign.

## Options

wpr3287 understands the following options:

-accepthostname name
  Specifies a particular hostname to accept when validating the name presented in the server SSL certificate, instead of comparing to the name used to make the connection.
-assoc LUname
  Causes the session to be associated with the specified LUname.
-blanklines
  In LU3 formatted mode, print blank lines even if they are all NULLs or control characters. (This is a violation of the 3270 printer protocol, but some hosts require it.)
-clientcert name
  Specifies the name of a client certificate to provide to the host. It must be in the Personal certificate store.
-charset name
  Specifies an alternate host code page (input EBCDIC mapping). The default maps the U.S. English (037) code page to the the system ANSI code page (unless overridden by the -printercp option). wpr3287 generally supports the same host character sets as wc3270.
-nocrlf
  Causes newline characters in the output to be left as-is, and not expanded to carriage-return/linefeed sequences.
-crthru
  In unformatted 3270 mode, causes EBCDIC CR orders to be passed to directly to the printer as ASCII CR characters, and the output buffer to be flushed, instead of being specially interpreted by wpr3287.

  By default, EBCDIC CRs cause the (virtual) print head to return to column 0, so that subsequent text overwrites what is already in the buffer, and the buffer is flushed only when an EBCDIC NL or EM order is received.

-eojtimeout seconds
  Causes wpr3287 to complete the print job after seconds seconds of inactivity.
-emflush
  Causes wpr3287 to flush any pending printer output whenever an EM (End of Medium) order arrives in unformatted 3270 mode. This can help preserve multi-page output with hosts that do not clear the 3270 buffer between pages. (Note: This option is defined for historical purposes only; -emflush is now the default.)
-noemflush
  Causes wpr3287 not to flush any pending printer output when an EM (End of Medium) order arrives in unformatted 3270 mode.
-ignoreeoj
  Ignore TN3270E PRINT-EOJ commands, relying on UNBIND commands to indicate the ends of print jobs.
-ffeoj
  Causes wpr3287 to add a FF (formfeed) at the end of each print job.
-ffskip
  Causes wpr3287 to ignore a FF (formfeed) order if it occurs at the top of a page.
-ffthru
  In SCS mode, causes wpr3287 to pass FF (formfeed) orders through to the printer as ASCII formfeed characters, rather than simulating them based on the values of the MPL (maximum presentation line) and TM (top margin) parameters.
-mpp n
  Specifies a non-default value for the Maximum Presentation Position (the line length for unformatted Write commands). The default is 132. The minimum is 40 and the maximum is 256.
-printer printer
  Specifies the Windows printer to use for each print job. The default is to use the printer specified by the $PRINTER environment variable, if defined, and otherwise to use the default Windows printer.

  The printer can be the name of a local printer, or a UNC path to a remote printer, e.g., \\server\printer1.

-printercp codepage
  Specifies the code page to use when generating printer output. The default is to use the system ANSI code page.
-noverifycert
  Do not verify the host certificate for SSL/TLS connections.
-proxy type:host[:port]
  Causes wpr3287 to connect via the specified proxy, instead of using a direct connection. The host can be an IP address or hostname. The optional port can be a number or a service name. For a list of supported proxy types, see PROXY below.
-reconnect
  Causes wpr3287 to reconnect to the host, whenever the connection is broken. There is a 5-second delay between reconnect attempts, to reduce network thrashing for down or misconfigured hosts.
-skipcc
  For unformatted writes, skip ASA carriage control characters (e.g., blank for single-space, 0 for double-space, 1 for formfeed, etc.) in the first position of each line of host output.
-trace
  Turns on data stream tracing. Trace information is usually saved in the file x3trc.pid.txt.
-tracedir dir
  Specifies the directory to save trace files in, instead of the current directory.
-trnpre file
  Specifies a file containing data that will be sent to the printer before each print job. The file contents are treated as transparent data, i.e., they are not translated in any way.
-trnpost file
  Specifies a file containing data that will be sent to the printer after each print job. The file contents are treated as transparent data, i.e., they are not translated in any way.
-v
  Display build and version information and exit.
-verifycert
  Verify the host certificate for SSL/TLS connections. (This is the default setting.)
-xtable file
  Specifies a file containing transparent data translations. The file specifies EBCDIC characters that will be translated into transparent ASCII data (data that will not be further translated and will not count as taking up column(s) on the print line). Any printable ECBDIC code can be translated to zero or more ASCII characters.

  The table consists of lines that look like:

  > ebcdic ebcdic-code ascii ascii-code...

  The ebcdic-code can be specified in hexadecimal X'nn' notation or as numbers in decimal, octal (with a leading 0) or hexadecimal (with a leading 0x). The ascii-codes can be specified as numbers in decimal, octal or hexadecimal, control codes such as ^X, symbolic control codes such as CR or Escape, or as double-quoted strings, following the full C-language conventions, such as \r for a carriage return. Comments begin with #, ! or //.

  Here are some examples of translations.
  # Expand EBCDIC D to an escape sequence.
  ebcdic X'C4' ascii Esc "]1,3" 0x6d
  # Delete EBCDIC B's
  ebcdic X'C2' ascii

  The full list of symbolic control codes is: BS CR BEL ESC ESCAPE FF HT LF NL NUL SPACE TAB VT.

## Environment

PRINTER
  Specifies the Windows printer to use for print jobs. The -printer command-line option overrides $PRINTER.

## Proxy

The -proxy option causes wpr3287 to use a proxy server to connect to the host. The syntax of the option is:

> type:host[:port]

The supported values for type are:

Proxy Type | Protocol | Default Port
http | RFC 2817 HTTP tunnel (squid) | 3128
passthru | Sun in.telnet-gw | none
socks4 | SOCKS version 4 | 1080
socks5 | SOCKS version 5 (RFC 1928) | 1080
telnet | No protocol (just send connect host port) | none

The special types socks4a and socks5d can also be used to force the proxy server to do the hostname resolution for the SOCKS protocol.

## See Also

wc3270(1)
Data Stream Programmer's Reference, IBM GA23-0059
Character Set Reference, IBM GA27-3831
3174 Establishment Controller Functional Description, IBM GA23-0218
RFC 1576, TN3270 Current Practices
RFC 1646, TN3270 Extensions for LUname and Printer Selection
RFC 2355, TN3270 Enhancements

## Copyrights

Copyright © 1993-2019, Paul Mattes.
Copyright © 1990, Jeff Sparkes.
Copyright © 1989, Georgia Tech Research Corporation (GTRC), Atlanta, GA 30332.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

*
  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
*
  Neither the names of Paul Mattes, Jeff Sparkes, GTRC nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY PAUL MATTES, JEFF SPARKES AND GTRC `AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PAUL MATTES, JEFF SPARKES OR GTRC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

  ## Version

  wpr3287 3.6ga8

  This HTML document and the accompanying troff document were generated with a set of write-only m4 macros and the powerful vi editor.
  Last modified 03 June 2019.