Printing

You can use Z and I Emulator for Windows to print from display or printer sessions. This chapter provides details about printing and page setup options.

Setting Up the Printer

This section describes how to set up your printer with either a Windows printer driver or a PDT file.

For an explanation of how to customize a PDT for PC/3270, see PDT Files (3270 and 5250). For an explanation of how to customize a PDT for PC400, refer to Administrator's Guide and Reference.

For information about print processing for PC400, see Print Processing. For information about print processing for PC/3270, see Print Processing.

You can map a key sequence to bring up the Printer Setup dialog. There is no default key combination for this function. See Default Key Function Assignments for more information about keyboard functions.

Defining a Printer for a Session

To choose or change the Windows printer driver to be used, follow these steps:

  1. Click File -> Printer Setup in the session window.

    The Printer Setup window lists the available printers.

  2. Select a printer from the list box. If desired, select the check box Show this dialog before every print.
    Note:
    The Default selection causes the current Windows default printer to be used.
  3. Confirm that Use PDT is not selected.

Page Setup Parameters

You can set Page Setup parameters, such as the maximum number of lines per page, the maximum number of columns, and fonts. These parameters are initially set to the defaults. Use this function to change specific control items.

Note:
When a PDT file is used, this function cannot be used.

To set or change setup items:

  1. Select File -> Page Setup from the menu bar of the session window.

    The Page Setup window opens.

  2. Select the tab that contains the parameters you want to change.
    Note:
    To switch from the current settings back to the defaults, select Default.
  3. When all the items have been set, click OK or Apply.

Text Parameters

You can set the following general parameters for 3270, 5250, and VT display sessions.

Table 1. Page Setup Parameters -- Text Tab
Parameter Description
CPI Specifies the number of characters to be printed per inch. If CPI was not set previously, a CPI value suitable for the font selected from the Font list box is assumed as the default.
LPI Specifies the number of lines to be printed per inch. If LPI was not set previously, an LPI value suitable for the font selected from the Font list box is assumed as the default.
Maximum Number of Lines per Page Specifies the maximum number of lines per page. A number in the range 1-255 can be specified. The default is 66.

When you set this to a value other than the default, Z and I Emulator for Windows uses it to scale the LPI and font to the best fit for the page.

Maximum Number of Characters per Line Specifies the maximum number of characters per line. A number in the range 1-255 can be specified. The default is 132.

When you set this to a value other than the default, Z and I Emulator for Windows uses it to scale the CPI and font to the best fit for the page.

Font Lists the fonts that can be used with the currently selected printer.

The fonts in brackets [ ] are device fonts specific to the printer driver. The other fonts are graphics display interface (GDI) fonts printed in bit map formats.

Margins This option maps the text on the screen to the printed page size.

This option is disabled by default. It is available for the following sessions:

  • 3270 display and printer
  • VT display, including Printer Controller Mode
Top or Left Margin

Specify the decimal number (either inches or centimeters, depending upon your location), which represents the offset that will be reserved as the margin.

Note:
The value entered must represent the distance from the paper's edge. However, most Print Drivers enforce a nonprintable border (area). The default (original value shown) represents the Print Driver's enforced margin. Your input value cannot be less than that value; if it is, the Driver's value is substituted for your value. Some printers have an additional nonprintable border not represented in the Driver's value.
Use best fit scaling

This option maps the text on the screen to the printed page size. This option is disabled by default. It is available for the following sessions:

  • 3270 display and printer
  • VT display, including Printer Controller Mode

Text Options Parameters

You can set the following parameters by selecting the Text Options tab.

Table 2. Page Setup Parameters -- Text Options Tab
Group Options Setting
Print Options

These options are not available for the printer session.

Suppress Null Lines Determines whether to delete lines containing only null or non-printable characters (null or non-printable field characters, and field attributes) or to print them as null lines.
Selected
Null lines are not printed.
Not selected
Null lines are printed.

This option can be used when:

  • The Print Screen command is used
  • The combination of bits 2 and 3 of the WCC is not 00
Print Nulls as spaces Determines whether to print NULL control codes as null characters.
Selected
The codes are printed as blanks.
Not selected
The codes are treated as null characters.

This option can be used when:

  • The Print Screen command is used

Replace FF by LF

Select this option to replace a form feed by the number of lines entered in the edit box. The default is unchecked.

Note:
This option is only available on TN3270/TN3270E and TN5250.

You create your own header and footer, and save up to five header and five footer configurations. Apply a saved header or footer by selecting it from the drop-down list.

Notes:
  1. A custom header or footer is associated with the specific session. A newly configured session will not have a header or footer.
  2. If BestFit is enabled, the header and footer will be truncated at the Maximum Print Position (MPP), as determined by the BestFit parameters. You can allow multiple lines to prevent truncation (from the Advanced options).

To add items to a custom header or footer, do the following:

  1. Select the desired alignment for the item (Left, Center, or Right).
  2. Double-click on the item in the Choices box.

    The item is added to the alignment box.

You can manually reorder the items in an alignment box. Remove an item by manually deleting it from the box.

You can set the following parameters by selecting the Header and Footer tab.

Table 3. Page Setup Parameters -- Header and Footer Tab
Group Category Parameter
Customize Header

Customize Footer

General The following information can be added to a header or footer:
  • Date
  • New Line
  • Page Number
  • PC Name
  • Time
  • PC User Name
Host Information The following host details can be added to a header or footer:
  • 3270 Application Name (3270 sessions only)
  • Host Name
  • LU Name
  • Workstation ID (5250 sessions only)
Session Information The following session details can be added to a header or footer:
  • Short ID
  • Short Name
Advanced Options Multiple Lines The following customization options are available:
  • Allow multiple lines in header
  • Allow multiple lines in footer

If the header or footer does not fit on a single line, then it will be truncated at the Maximum Print Position. Select this option to allow multiple lines on the header or footer and prevent truncation.

Page Number The Always start from parameter specifies the starting value for the page number to be included in the header or footer.

By default, the page number begins at 1.

Graphics Parameters (3270)

From a Z and I Emulator for Windows 3270 session, you can set additional parameters by selecting the Graphics tab.

Table 4. Page Setup Parameters -- Graphics Tab (3270)
Parameter Description
Scaling By default, the screen size (display resolution) is mapped to the printed page size (printer resolution)--this is called BestFit. It is done automatically if you change either resolution (including changing printers). The /2, /3, and /4 values reduce the printed page size.
Black-on-White Determines how the black pixels on the screen are printed.
Yes
Black pixels are printed as white pixels. Pixels other than black are printed as black pixels when you use a monochrome printer. When you use a color printer, they are printed in the same color as on the screen.
No
Black pixels are printed in black. Pixels other than black are printed as white pixels when you use a monochrome printer. When you use a color printer, they are printed in the same color as on the screen.

Orientation Parameters (5250)

When you use a PC400 printer session, you can set the following additional parameters by clicking the Orientation tab.

Table 5. Page Setup Parameters -- Orientation Tab (PC400 Printer Session)
Group Parameter Description
Margins

These margin settings are used only if Use best fit scaling is selected.

Top Margin Bottom Margin is assumed to be equal to Top Margin.
Left Margin Right Margin is assumed to be equal to Left Margin.
Page Orientation

Changes the default page orientation to specify how to print a document on the workstation printer. If the orientation is explicitly set by the iSeries®, eServer™ i5, or System i5® page setup code, the explicit orientation is used.

Use automatic page orientation If selected and the host does not explicitly set the orientation, the best orientation based on the host specified CPI, LPI, and page size will be used.

If not selected and the host does not explicitly set the orientation the following drawer orientation will be used.

Drawer 1 orientation

The default page orientation for the paper from drawer 1.

Computer output reduction The document is printed in landscape. The font, pitch, and margins are set to appropriate values to fit on a page.
Portrait The document is printed in portrait.
Landscape The document is printed in landscape.
Drawer 2 orientation

The default page orientation for the paper from drawer 2.

Computer output reduction The document is printed in landscape. The font, pitch, and margins are set to appropriate values to fit on a page
Portrait The document is printed in portrait.
Landscape The document is printed in landscape.

When you use a PC400 printer session, you can set the following additional parameters by clicking the Form Settings tab. This option is available only when the printer and its driver support the change-source function.

Table 6. Page Setup Parameters -- Form Settings Tab (PC400 Printer Session Only)
Parameter Description
Form Settings Specifies the form that should be selected when an application program specifies one of the following paper sources:
  • Drawer-one form
  • Drawer-two form
  • Envelope-hopper form

Before using this function, you must configure the paper trays and forms in the printer-driver setup.

Table 7. Page Setup Parameters -- Advanced Options Tab (PC400 Printer Session Only)
Option Item to be set
Printer Font Code Page Represents the code page being used for printing and displaying on the workstation.
No CR between fields Represents not sending a CR when printing other fields on the same line.
Print bold as normal Represents printing bold characters as not bold.
Display print status dialog Represents showing a dialog window that will display showing printer status.
Use raster fonts Represents allowing bitmap fonts for display and printing.

Display Sessions (3270 and 5250)

From display sessions, you can print all (Print Screen) or part (Trim Print) of the screen of your session window on a workstation printer. Trim Print is not available for PC400 sessions. For more information, refer to Quick Beginnings or the online help.

From a 3270 display session, you can also use the ZipPrint utility to print PROFS™ notes, calendars, documents, CMS files, XEDIT workspaces, and host-session screens. See the online help for more information.

Print Screen Collection

The Print Screen Collection functions are available for 3270 and 5250 display sessions. You can capture all or part of the screen and add it to a collection of screen captures, and then print all the collected screen captures at the same time.

Collect Screens

Using the File -> Print Screen Collection -> Collect Screen feature, you can add a capture of all or part of the screen to a collection of captures.

To capture part of a screen, take the following steps:

  1. Use the marking rectangle to mark an area of the screen.
  2. Click File -> Print Screen Collection -> Collect Screen in the usual way. Z and I Emulator for Windows captures the entire screen image (including the white marking rectangle) and adds the screen image to the list of collected screen captures in the usual way, so that you can see the context of the area enclosed by the white marking rectangle.
  3. Print the screen image. Z and I Emulator for Windows prints only the area that lies inside the white marking rectangle.
Note:
The Collect Screens feature works independently of the normal Print Screen function. You can still use Print Screen to print an individual screen, while collecting multiple screens.

Print and Purge Collection

Using the File -> Print Screen Collection -> Print and Purge Collection feature, you can send the collected print screens to the printer. A status bar message indicates how many screens have been printed. The current Page Setup settings are applied to the printed screens. All the collected screens are purged.

Print and Keep Collection

Using the File -> Print Screen Collection -> Print and Keep Collection feature, you can send the collected print screens to the printer. A status bar message indicates how many screens have been printed. The current Page Setup settings are applied to the printed screens. All the collected screens are available for reprint.

Process Collection

Using the File -> Print Screen Collection -> Process Collection feature, you can preview the collected screens and select collected screens to be printed or purged.

On the Process Print Screen Collection window, you can perform the following tasks:

Purge Collection

All the collected screens can be deleted without printing by clicking File -> Print Screen Collection -> Purge Collection. A confirmation message will be displayed. Click Yes to purge the collected screens.

Print Collection on Exit

The File -> Print Screen Collection -> Print Collection on Exit option ensures that the collected screens are printed before you close or disconnect the session. This option is enabled by default. To end the session without printing the collected screen, clear the Print Collection on Exit option. All the collected screens are then deleted when you close or disconnect the session.

When this option is disabled and you disconnect the session, a confirmation message will be displayed. Click Yes to purge the collected screens on exit.

You can add the Collect Screens, Print and Purge Collection, Print and Keep Collection, Process Collection, Purge Collection, and Print Collection on Exit functions to the toolbar, a popup keypad, a custom keyboard map, or a mouse customization, using the Edit -> Preferences menu in the session window. The settings in the Page Setup dialog are used (shared with the normal Print Screen function).

In PDT mode, there is an option available for printing more than one screen on a page. Refer to Administrator's Guide and Reference for more information.

Replace FF with LF in GDI Print Mode

In Multiple Print Screen functionality, 3270/5250 host screens can be collected and then released to the physical printer. Each print screen that is collected is printed on a separate page, like individual print screens. However, in PDT mode using the BEL command, the Form Feeds (between two screens) can be converted to specified number of Line Feeds that is defined in the PDF/PDT file.

With this feature, the same functionality has been extended to GDI print mode, using the following workstation profile keyword:

[Printers]
ReplaceFFbyLF=<Byte value>

The possible byte values are as follows:

Byte Value Action
00 No LF between screens
01 to 0xFE LFs between screens
0xFF FF after each screen
No keyword Default (FF after each screen)

Printer Sessions (3270 and 5250)

From printer sessions, you can direct printing from a zSeries, iSeries, eServer i5, or System i5 to a workstation printer.

Note:
When you use a host application which prints to your workstation's LPT1, you must first select the printer in the Printer Setup dialog of the File menu.

Configure a printer session to designate a workstation printer as a system printer that will use either a Windows printer driver or a printer definition table (PDT) provided with Z and I Emulator for Windows.

PDT Files (3270 and 5250)

PDTs (printer definition tables) are compiled from PDFs (printer definition files). PDFs contain printer commands that must be understood and supported by your printer.

The following are the basic printer languages:

PCL
Printer Control Language (Hewlett-Packard)
PPDS
ProPrinter Data Stream (IBM®)
ESC/P
Printer Control Language (Epson)
POSTSCRIPT
(No PDFs for this language)

Many printers support two or more of these languages. Most print drivers use a PJL (Printer Job Language) to switch between languages and to perform other job control functions, such as setting the number of copies.

You do not need a PDF for each different printer model; with the increasing number of models, PDFs are named for the printer language, not the printer model.

Older SBCS PDFs and PDTs are not shipped with Z and I Emulator for Windows, but are available at the product Web site. If you already have modified PDFs, any PDF and PDTs other than those in Table 8 are retained during an install.

The End_Job statement in a PDF contains the printer commands that are sent to the printer at the end of each print job. If the End_Job contains a character defined as form feed (FFF in the PDT), a form feed (FF) is sent to the printer. It is not needed if the host application ends the job with the FF, as is commonly done. Some print drivers add the FF if needed, and most print drivers ignore extra FFs. So the FFF usually is protection against the host application not using a FF, and usually causes no problem. However, if you get an extra blank page, remove the FFF.

Table 8. Old Printer Definition Files
Printer Definition File (PDF) Name Remarks
ibm5577a (No FFF)
ibm5577b (No FFF)
lbp4

The supplied basic_ascii PDF does not contain any printer commands, which results in only ASCII text being sent to a printer or file. An accompanying PDT is also shipped. This PDF is for SBCS only.

PFT Migration

You can migrate a PC Support/400 Workstation Feature Printer Function Table (PFT) to a PDF for PC400. Refer to Administrator's Guide and Reference for more information.

Using PDT Files

To use a PDT file:

  1. Click File -> Printer Setup from the menu bar of the session window.

    The Printer Setup window opens.

  2. Click the printer to be used from the list box.
  3. Click Setup; specify the paper size.
  4. Click OK.
  5. Select the Use PDT check box, then click Select PDT.

    The Select PDT file window opens.

  6. Do one of the following:
  7. Click OK in the Printer Setup window.

Windows print driver for VT host printing

You can use the Windows print driver for VT host printing. This functionality adds to the existing PDT printing capability.

Table 9 lists the printers to use with supported PDTs.

Table 9. Printer Models and Supported PDTs
File Name Printer Name/Model
IBM5577.PDT
IBM 4208-501, -5C2, -5K2
IBM 4216-510
IBM 5572-B02
IBM 5573-HC2
IBM 5575-B02, -F02, -H02, BC2, -FK1E
IBM 5577-B02, -G02, -H02, FC2, -HC2, -KC2,-HK2
IBM 5579-H02, -KC2
IBM5585.PDT
IBM 5585-H01, -HC1
IBM 5587-G01
IBM 5587-H01 (with extended functions)
IBM 5589-H01
IBM5587.PDT
IBM 5587-G01
IBM 5587-H01 (without extended functions
KS_JO.PDT KS printer with combination code
KS_WAN.PDT KS printer with completion code
KSSM_JO.PDT KSSM printer with combination code
KSSM_WAN.PDT KSSM printer with completion code

Collecting Print Jobs (5250 Printer Session)

You can collect 5250 print jobs and print them as a single job or in a group. The collected print jobs are stored in a .SCS file.

Note:
This functionality is not supported in Host Print Transform mode.

You can set the following .WS profile keywords to specify the path and file name for the .SCS file.

[Printers]
SCSFile=<filename>.scs
SCSPath=<local path>

The functions associated with this feature are listed below. The functions can be mapped to the keyboard, popup keypad, mouse button, or toolbar button.

Refer to the online help for details about mapping the functions.

The CombineJobs profile keyword enables you to collect the jobs for printing, while maintaining them as individual jobs (instead of one job in the .SCS file). Specify the .WS keyword as follows:

[Printers]
CombineJobs=N

If you set CombineJobs to N, the Print Collection function sends the separate, collected jobs to the printer. While in Collect Mode, if the keyword is set to Y or is not specified, the print jobs are combined as a single job in the .SCS file.

Printing to Disk

If you are using a PDT, you can save a host print-job or the contents of the session window (Print Screen) to a workstation file instead of printing it.

Two types of Print-to-Disk function are provided by Z and I Emulator for Windows:

Print-to-Disk Append
Appends multiple host print jobs or print screen jobs to a single workstation file.
Print-to-Disk Separate
Saves each host-print job or screen to a separate workstation file. You can specify the file name, but the extension is automatically assigned as a decimal number from 000 to 999. If you delete a file, its number will be re-used. When all 999 numbers have been used, the extension is automatically assigned a decimal number from 1000 to 9999.
Notes:
  1. Print-to-Disk is not available for the Print-Graphics function.
  2. Print-to-Disk can be used only when you use a printer definition table (PDT) file.

To set up Print-to-Disk:

  1. Click File -> Printer Setup from the menu bar in the session window.

    The Printer Setup window lists the supported printers.

  2. Select Print to Disk Append or Print to Disk Separate from the list box.
  3. Click Select PDT.

    The Select PDT file window opens.

  4. Select a PDT file from the list; then click OK.

    The Printer Setup window reopens.

  5. Click Setup.

    The Select Print-to-Disk File window opens.

  6. Specify a file name, drive, and path; then click OK.
    Note:
    If you specify the name of an existing file, subsequent print jobs are appended to the data in the original file in the case of Print to Disk Append.

Workstation Profile Parameter for Code Page

Occasionally a font does not support the desired code page. The wrong characters may be printed within the specific character set (Latin 2, for example). Z and I Emulator for Windows has a workstation profile parameter that allows the program to use a different code page that is supported by the desired font.

You can use the PrinterFontCodePage parameter if the following conditions are met:

However, because some Z and I Emulator for Windows releases might require manual adjustment of the workstation profile, try using different fonts before altering the .ws file. Fonts are listed in the Z and I Emulator for Windows Page Setup panel for all display sessions and 3270 host print sessions. For 5250 print sessions, the PCSPD.DAT file can be manually changed to control the fonts used. The Courier New font should support most languages and corresponding code pages.

To edit the .ws file, you must change the PrinterFontCodePage parameter to the value of the supported code page you wish to use. This option must be put in the [Printers] section, and is case-sensitive. See the following example for the proper parameter syntax. The parameter does not need to be placed immediately after the [Printers] section label.

[Printers] 
PrinterFontCodePage=852 

In this case, the desired font is encoded with code page 852. Z and I Emulator for Windows uses a different, existing translation table to translate data from EBCDIC to 852, versus using the standard Windows code page.

This option is on the Page Setup panel for Z and I Emulator for Windows 5250 print sessions.