IBM Support

Configuring a PC5250 Printer Session for a Label, Barcode or Receipt Printer

Troubleshooting


Problem

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:
oConfigure 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).
oConfigure 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.
oConfigure 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 printing to a label or barcode printer, the third-party or in-house application running on the IBM System i server typically generates a *SCS spooled file that contains the text-based printer controls used for a specific printer model. When printing to a receipt printer, the third-party or in-house application running on the IBM System i server may generate a *SCS spooled file that contains the text-based printer controls used for a specific printer model or may just send only text. In either case, it is recommended that Host Print Transform (HPT) be used with the Workstation customizing object (WSCST) parameter set to QWPDEFAULT in library QSYS so HPT converts the EBCDIC text contained in the *SCS spooled file to plain ASCII text -- so no additional printer controls will be sent to the printer.

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:

      oMust be 10 characters or less.
      oMust start with an alphabetic character (A through Z).
      oThe remaining characters can be an alphabetic character (A through Z), a numeric character (0 through 9), "$", "#", "@", "_" or ".".
      iSeries Access supports TCP/IP connections only. Therefore, if you configure a PC5250 printer session and do not specify a Workstation ID, the operating system printer device description name defaults to one of the QPADEVxxxx device descriptions. These are normally reserved for Telnet display sessions. However, if device naming is not used, one of the existing QPADEVxxxx device descriptions is changed from a display device description to a printer device description.

      Note: V5R1M0 Client Access Express added several enhancements for specifying a workstation ID. These enhancements include:
      oUse computer name. Use the name of the computer as defined on the Identification tab of the Network properties page of the Windows Control Panel.
      oUse Windows user name. Use your Windows logon user ID.
      oSpecify 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: &, *, %, =, +).
      oAdd prefix to indicate printer or display. Specify this option to append a P or an S to the beginning of the device name.
      oAvoid 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.
      oAvoid 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.
      oTruncate. 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.
      Note: It is recommended that Avoid duplicate names on this workstation and Avoid duplicate names with other workstations not be used with PC5250 printer sessions. These options can be very useful for PC5250 display sessions because they allow a user to bring up several display sessions and to sign on multiple times to a single IBM® System i™ products server. There is rarely a need to configure several PC5250 printer sessions for a single printer to the same server. These options can cause the workstation ID to change each time the printer session is connected. Therefore, a user would not be able to rely on the printer having the same name each time. It could also cause a specific workstation ID to be assigned to one user's printer on one day, and another user's printer the next day.

      • - 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.

        This print screen shows the Category View within the Windows Control Panel.

        Then, click on Add a printer under Pick a task.

        This print screen shows the Printers and Other Hardware category under the Windows Control Panel.
        2b.If using the Classic View, double-click on Printers and faxes.

        This print screen shows the Classic View within the Windows Control Panel.

        Then, click on Add a printer under Printer Tasks.

        This print screen shows the Printer and Faxes folder under the Windows Control Panel.
        3.After completing Step 2a or Step 2b, Windows launches the Windows Add Printer Wizard.

        This print screen shows the Welcome screen within the Add Printer Wizard.
        4.Click on the Next button and select "Local printer attached to this computer".

        This print screen shows the Local or Network Printer screen within Add Printer Wizard with "Local printer attached to this computer" selected.
        5.Click on the Next button and set the port to "FILE: (Print to File).

        This print screen shows the Select a Printer Port screen within Add Printer Wizard with "FILE: (Print to File)" selected.
        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.

        This print screen shows the Install Printer Software screen within the Add Printer Wizard with "Generic" and "Generic / Text Only" selected.
        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.

        This print screen shows the Name Your Printer screen within the Add Printer Wizard with the printer name set to "Generic / Text Only".
        8.On the Printer Sharing screen, there typically is no need to share the printer. Click Next.

        This print screen shows the Printer Sharing screen within the Add Printer Wizard with "Do not share this printer" selected.
        9.On the Print Test Page screen, you are asked if you want to print a test page. Select "No" , and click Next.

        This print screen shows the Print Test Page screen within the Add Printer Wizard with "No" selected.
        10.On the Completing the Add Printer Wizard screen, click Finish.

        This print screen shows the Completing the Add Printer Wizard screen.

        • - 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.

          This print screen shows "IBM Personal Communications - Session Manager" wihich only has an icon for the existing PC5250 display session.
          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.

          This print screen shows the Configure PC5250 dialog box.

          Notes:

          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.

          This print screen shows 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.

          This print screen shows the PC5250 printer session with the Printer Control dialog box showing that the printer session is "Ready" and "On-Line".

          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.

          This print screen shows the "Save WorkStation Profile as" dialog box.
          9.An icon for the new PC5250 printer session is automatically added to the "IBM Personal Communications - Session Manager" dialog box.

          This print screen shows "IBM Personal Communications - Session Manager" wihich now includes an icon for the new PC5250 printer session.

          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.

        [{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

        Historical Number

        441839109

        Document Information

        Modified date:
        18 December 2019

        UID

        nas8N1018917