This document provides instructions for configuring a Personal Communications 5250 (PC5250) printer session profile for a label, barcode or receipt printer when using iSeries Access for Windows.
Resolving The Problem
Important Note: This document discusses Client Access for Microsoft Windows 95 and Windows NT, Client Access Express, and IBM iSeries Access products. These names essentially refer to the same product; however, the functionality and name changed over the last several releases. For the purposes of this document, the terms Client Access, Client Access Express, iSeries Access, and System i Access may be used interchangeably. Where a difference is important, the version of the product is used to identify the differences.
This document provides instructions for configuring a Personal Communications 5250 (PC5250) printer session profile for a label, barcode or receipt printer when using V7R1M0 (7.1) System i Access for Windows (5770XE1), V6R1M0 (6.1 or R610) System i Access for Windows (5761XE1), or V5R4M0 (R540), V5R3M0 (R530) or V5R2M0 (R520) iSeries Access for Windows (5722XE1). For general instructions on configuring a PC5250 printer session profile for other types of printers, please refer to the following document:
N1018716: System i Access for Windows: Configuring a PC5250 Printer Session
A PC5250 printer session can be used to print an operating system spooled file to a virtual printer that can be accessed from the PC. This includes printers that are directly attached to the PC and printers that are attached to the network. Of course, there are exceptions to this. In general, if you can print to the printer from a specific PC, you should be able to print through a PC5250 printer session to the same printer.
This document was last updated on 8 November 2013.
Options for Configuring a PC5250 Printer Session
The following methods can be used to configure a PC5250 printer session, each with its own benefits:
|o||Configure the PC5250 printer session to use a Windows printer driver. This is the easiest way to configure a PC5250 printer session; however, it gives you only a small amount of control over how the output is printed. This is done by selecting File > Printer Control > Text on the menu bar and clicking on the Options or Advanced button (depending on the version of Client Access/400 you are using).|
|o||Configure the PC5250 Printer Session to use a Printer Definition Table (PDT). This gives you control over how the output is printed by allowing you to copy and modify a Printer Definition Source File (PDF) and then create your own PDT file.|
|o||Configure the PC5250 printer session to use Host Print Transform (HPT). This causes the conversion from the SCS printer data stream of the operating system to the data stream for the printer to be done on the operating system. This is especially beneficial if several different printer emulation packages are being used (for example, PC5250, RUMBA/400, WSF, and others) because all of the output would look very similar. This also provides control over how the output is printed by allowing you to retrieve, modify, and create your own Workstation Customization Table (WSCST).|
When using a PC5250 printer session to print to the label, barcode or receipt printer, it is also recommended to set up the Windows print queue to use the Generic Text Only printer driver rather than the Windows printer driver for the particular model of label or barcode printer. This is so that the printer driver will not add any printer controls to the text that is sent to the printer.
This document shows the steps required to configure the PC5250 printer session to use the Generic Text Only printer driver within Windows and to select "Transform print data to ASCII on iSeries" with the Printer model set to *WSCSTCONT132 and the Customizing object set to QWPDEFAULT in library QSYS. The printer session could be configured to use the Generic Text Only printer driver without Host Print Transform (HPT) or a Printer Definition Table (PDT) file (Option 1 above) or, it could be configured to use the basic_ascii.pdt file (Option 2 above); however, the best results are generally acheived using HPT with QWPDEFAULT (Option 3 above).
- Information about Specifying a Workstation ID
PC5250 printer sessions support device naming (requesting a particular operating system device description name) by specifying a workstation ID under Communication > Configure. It is recommended that you specify a specific workstation ID for your PC5250 printer sessions so you can rely on it always having the same name. Otherwise, your printer session could connect with one device description name one day and a different device name the next day. If a specific name is used all the time, that name can be specified in a user profile or a printer file to direct output to that specific printer.
The workstation ID must follow the same rules as any other operating system device description:
o Must be 10 characters or less. o Must start with an alphabetic character (A through Z). o The remaining characters can be an alphabetic character (A through Z), a numeric character (0 through 9), "$", "#", "@", "_" or ".".
Note: V5R1M0 Client Access Express added several enhancements for specifying a workstation ID. These enhancements include:
o Use computer name. Use the name of the computer as defined on the Identification tab of the Network properties page of the Windows Control Panel. o Use Windows user name. Use your Windows logon user ID. o Specify workstation ID. Provides a space for you to type the name of this workstation (up to 10 characters, must not start with a numeric, and cannot contain a blank or any of the following characters: &, *, %, =, +). o Add prefix to indicate printer or display. Specify this option to append a P or an S to the beginning of the device name. o Avoid duplicate names on this workstation. Specify this option to append a short session ID (A, B, C, and so on) to the end of the device name. This ensures that your workstation ID will not conflict on this workstation. o Avoid duplicate names with other workstations. Specify this option to append a character in the range of 1 through 9 and A through Z to the end of the device name. This ensures that your workstation ID does not conflict with the workstation IDs from other workstations. If you specify Avoid duplicate names on this workstation in addition to this option, the short session ID is appended first. o Truncate. Specify to truncate from the beginning or from the end of the workstation ID, when necessary. The workstation ID must not exceed 10 characters. This includes the characters that are added if you select Add prefix to indicate printer or display, Avoid duplicate names on this workstation, and Avoid duplicate names with other workstations. By default, the Ending characters of the workstation ID are truncated.
- Adding a Windows Print Queue That Uses the Generic / Text Only Printer Driver
This section provides step-by-step instructions for using the Windows Add Printer Wizard to add a Windows print queue that uses the Generic / Text Only printer driver to point to your label, barcode or receipt printer.
1. Click on the Windows Start button. Then, click on Control Panel. 2a. If using the Category View, click on Printers and Other Hardware. Otherwise, see Step 2b.
Then, click on Add a printer under Pick a task.
2b. If using the Classic View, double-click on Printers and faxes.
Then, click on Add a printer under Printer Tasks.
3. After completing Step 2a or Step 2b, Windows launches the Windows Add Printer Wizard.
4. Click on the Next button and select "Local printer attached to this computer".
5. Click on the Next button and set the port to "FILE: (Print to File).
6. This should take you to the Install Printer Software screen. Scroll through, select Generic under the list of Manufacturers, and select Generic / Text Only under the list of Printers. Then, click on Next.
7. Eventually you will reach the Name Your Printer screen. Type your preferred Printer name, or leave it at the default of "Generic / Text Only". This printer can be selected as the Windows default printer; however, typically that would be reserved for a laser or ink jet printer rather than a label, barcode or receipt printer. Click Next.
8. On the Printer Sharing screen, there typically is no need to share the printer. Click Next.
9. On the Print Test Page screen, you are asked if you want to print a test page. Select "No" , and click Next.
10. On the Completing the Add Printer Wizard screen, click Finish.
- Configuring a PC5250 Printer Session to Use Host Print Transform (HPT) with QWPDEFAULT
This section provides step-by-step instructions for configuring the PC5250 printer session. These steps must be completed only after going through the instructions in Adding a Windows Print Queue that Uses the Generic / Text Only Printer Driver to add a Windows print queue that uses the Generic / Text Only printer driver to point to your label, barcode or receipt printer.
1. Click on the Windows Start button. Then, click on All Programs > IBM iSeries Access for Windows > Emulator > Start or Configure Session. 2. Click on the New Session button.
3. A new session is started, and the Configure PC5250 dialog box is opened to start configuring that new session. Select the System name from the pulldown list (or type the name of the system), select Specify workstation ID, and type the preferred name for the printer device description on the System i™ system (for example "LABELPRT01"), select Printer for the Type of emulation, and then click on the Setup button.
It is strongly recommended that PC5250 printer sessions be configured with unique name specified under "Specify workstation ID". The other options ("Use Computer name", "Use Windows user name", "Add prefix to indicate printer or display", "Avoid duplicate names on this workstation", and "Avoid duplicate names with other workstations") are intended to be used with PC5250 display sessions rather than PC5250 printer sessions.
Select "Auto-reconnect" if you want the session to automatically attempt to reconnect to the system if the session gets disconnected for some reason other than a normal disconnect.
The Host code-page indicates the default translation table that is to be used to map IBM i EBCDIC codes from the IBM i system to the appropriate ANSI graphics on the PC.
The Port number is typically set to 23 unless a Secure Sockets Layer (SSL) connection is needed, in which case it should be set to 992.
4. Leave the Message Queue at the default value of QSYSOPR in library *LIBL unless you prefer to use a specific message queue other than QSYSOPR and that message queue has already been created using the Create Message Queue (CRTMSGQ) command. Then:
a Select "Transform print data to ASCII on iSeries".
b Select the Printer model setting of *WSCSTCONT132 from the pulldown list.
c Select the Drawer 1 setting of "Continuous form (13.2 inches)" from the pulldown list.
d Set the Customizing Object to QWPDEFAULT.
e Set the Library to QSYS (or *LIBL).
f Click OK to exit the PC5250 Printer Emulation Setup dialog box.
5. Click OK again to exit the Configure PC5250 dialog box. 6. The PC5250 printer session shows a Printer Control dialog box showing the system name and printer device description (or workstation ID) name. If the Ready and On-Line lights are on, the printer session has successfully connected to the system, and a printer writer has been started.
Note: When a more recent version of iSeries Access for Windows is installed, the PC5250 printer session contains Print Session Information displaying the Connection Status, Host Name, Host Type, Workstation ID, HPT, HPT Printer Model, Printer, PDT File, Margin-Let/Top, and Bestfit Scaling settings.
7. Select File > Printer Setup from the PC5250 printer session menu bar. Select the Generic / Text Only print queue from the list, click on the Setup button, and click OK to exit the Windows print queue Properties dialog box, Then, click OK to exit the Printer Setup dialog box. 8. Select File > Save from the PC5250 printer session menu bar to save the new PC5250 printer session. Assign the printer session profile an appropriate name (for example, printer.ws, prt05.ws, p5.ws, or "Label Printer.ws"), and specify a description (for example, "Label or barcode printer") if desired. Then, click OK.
9. An icon for the new PC5250 printer session is automatically added to the "IBM Personal Communications - Session Manager" dialog box.
To add an icon for the new PC5250 printer session to your Desktop, point to the new session, click and hold the right mouse button, drag the icon to the Desktop, and release the button. Then, select Create Shortcuts Here from the context or popup menu.
18 December 2019