C H A P T E R  7

3270 Printer

The 3270 Printer is a Windows application that uses the Sun MTP Client EPI interface to provide a 3270 gateway into Sun MTP. The printer allows printer-based applications to send data to a virtual printer device. The printer can either

Data written to a file can be edited for inclusion in spreadsheets, word processor documents or other applications.

The printer formats data according to the printing rules specified in the IBM 3270 Information Display System Data Stream Programmers Reference.



Note - The 3270 Printer is not available for the Solaris operating environment.




Configuring the 3270 Printer

This section describes how to configure the printer using the command line parameters.


procedure icon  To Configure the Printer

1. Highlight the Sun MTP Printer icon from the Sun MTP Client program group.

2. Select Properties from the Program Manager File menu.

3. When the dialog box for kixprnt.exe appears, add the command line parameters you need

kixprnt /t "hp sys1" /f c:\acct.txt /s Accounts

The following command line parameters are accepted:

/d device_type
Sun MTP device type, up to 16 characters, for this virtual printer device.
/f print_file
File to which formatted output is appended. If no file name or print command are specified, the printer opens and appends to a default file, kixprnt.txt. You can edit the print file and extract data for use in other applications. The printer does not delete the file. If both /f and /p are given, the printer ignores the file specified with /f and writes to a temporary file created by the printer as described in /p.
/n netname
Sun MTP netname, up to 8 characters, to assign this virtual printer device. Check with your system administrator.
/p command
Command run by the printer every time a print request is received. The name of the temporary file to process is appended to the end of the command string. For example, for this command
kixprnt /p hppmt
the printer appends the name of the temporary file forming this command
kixprnt /p hppmt c:\tmp\123
The user command must delete the temporary file. See also Example kixprnt Commands.
/s system_name
Name, up to 8 characters, of the Sun MTP region to which to connect. If not specified at start-up, select a system from the System selection dialog. Adding Systems to the KIXCLI.INI File describes how to add systems to the KIXCLI.INI file.
/t trans_id [data]
Transaction to run when the printer has successfully connected to Sun MTP. If passing data with the initial transaction, you must enclose the transaction ID and data in quotes, for example:
kixprnt /t "CEBR testq"


Example kixprnt Commands

This section contains examples of kixprnt commands.

Example 1

Write text to the 3270.txt file in the c:\ directory:

$ kixprnt /f c:\3270.txt

Example 2

Writes the print text to a temporary file, then executes a user-written command, usercmd, with the name of the temporary file appended to the end of the command:

$ kixprnt /p usercmd

Example 3

If the temporary file for the previous command was created as c:\tmp\453, the user command executed is:

$ usercmd c:\tmp\453

Example 4

The name of the temporary file is always appended to the end of the command. Therefore, if the kixprnt command had flags defined as /c and /g, for example:

$ kixprnt /p "usercmd /c /g"

then the user command executed is:

$ usercmd /c /g c:\tmp\453 


Starting the 3270 Printer

The following subsections describe the two methods for starting the printer and connecting to a system

  • From the 3270 Printer icon
  • From a command line

procedure icon  To Start the 3270 Printer From the 3270 Printer Icon

1. From the Sun MTP Client group, double click the 3270 Printer icon.

2. If the System Selection dialog appears, illustrated in FIGURE 7-1, select a system to connect to using either method:

  • Double click the system.
  • Single click the system, then select OK.


Note - If the printer was configured in the Program Manager with a system name, the System Selection dialog does not appear.



 FIGURE 7-1 3270 Printer System Selection Dialog

Screen shot showing the printer system selection dialog box.

procedure icon  To Start the 3270 Printer From a Command Line

1. Select Run from the Program Manager File menu.

2. Type the kixprnt command in the Command box with the parameters desired.

See Configuring the 3270 Printer for a description of the parameters.


3270 Printer Screen

On startup, the printer appears as an icon, by default. When a connection is made to the Sun MTP region, the netname under which the printer was installed is displayed beneath the icon.

 FIGURE 7-2 3270 Printer Icon

Screen shot of the Printer icon.

The printer window displays details of the print file, print command, and any error messages, as illustrated in the following figure.

 FIGURE 7-3 3270 Printer Screen

Screen shot showing the printer window.


Stopping the 3270 Printer


procedure icon  To Stop the Printer

single-step bulletUse either method:

  • Select the close option from the system menu in the top left hand corner of the main window.
  • Use the icon.