IBM Support

Printing Spooled Files to Printers Based on the User's PC5250 or TN5250e Display Session

Troubleshooting


Problem

This document provides information on setting up a user's display session to point to a particular printer device description, so host print screens and other spooled files are routed to a specific printer based on where a user is currently signed on.

Resolving The Problem

This document provides information on setting up a user's display session to point to a particular printer device description, so host print screens and other spooled files are routed to a specific printer based on where a user is currently signed on.

Notice: Changes have been made to accommodate the new Printer Association support in 7.1 IBM i Access for Windows, 6.1 IBM i Access for Windows, V5R4M0 (R540) iSeries Access for Windows and V5R3M0 (R530) iSeries Access for Windows. The Printer Association support is also available for 5250 Display sessions configured using the java-based IBM i Access Client Solutions.

With the Printer Association feature, if a display device description has been changed to specify a printer device description name in the Print device (PRTDEV) parameter then the next time the display device reconnects the PRTDEV parameter will be reset to *SYSVAL.

This change was primarily made because of issues that can arise when one of the QPADEVxxxx display device descriptions are changed to refer to a specific printer device through the Print device (PRTDEV) parameter. The QPADEVxxxx display devices are shared among PC5250 and TC5250e display sessions that do not specify a workstation ID. There is no guarantee that you will get the same QPADEVxxxx device the next time you connect a PC5250 or TN5250e display device, and there have been cases where another user gets the QPADEVxxxx device that has been manually changed which causes their printer output to go to the wrong printer. This can also cause your spooled files to start going to another printer if you get a QPADEVxxxx device that no longer has your printer specified in the PRTDEV parameter.

This document explains how to setup a PC5250 display session to use the new Printer Association support, which is the recommended way to associate a printer device with your display sessions. However, you can circumvent the issue by changing your user profiles to point to the appropriate printer device using the Print device (PRTDEV) parameter in the Change User Profile (CHGUSRPRF) command; for example:

CHGUSRPRF USRPRF(user-profile) PRTDEV(printer-device-name)

or by changing your interactive job to point to the appropriate printer device using the Print device (PRTDEV) parameter in the Change Job (CHGJOB) command; for example:

CHGJOB JOB(*) PRTDEV(printer-device-name)

The CHGJOB command can also be added to a CL program that is run automatically each time a user signs onto the IBM System i by specifying that CL program in the Initial program to call (INLPGM) parameter in your user profiles, for example:

CHGUSRPRF USRPRF(user-profile) INLPGM(library-name/cl-program-name)

This document was last updated on 14 April 2014.



    • - Old Method (Not Recommended for Newer Releases)



      The old method for associating a PC5250 display session with a particular printer device description, which is not recommended for V5R3M0 (R530) iSeries Access for Windows and above, consists of setting up the display session to specify a particular workstation ID, rather than grabbing an available QPADEVxxxx device, and then manually changing the display device description to specify the printer device description in the Print device (PRTDEV) parameter.

      Note: This method is the only way to associate a printer device description with a display session prior to V5R3M0 i5/OS, but it is not recommended for 5.3 i5/OS and above. For the newer releases, PC5250 display sessions should be setup to use the new Printer Association support instead.

      The Print device (PRTDEV) parameter in your display device description can be manually changed by using the following instructions:

      1.Select Communication > Configure on the PC5250 display session and specify a workstation ID; for example, DSP15 or JOHNS1.
      2.Allow the display session to connect.
      3.Use the Change Device Description Display (CHGDEVDSP) command to change the display device description to set the print device (PRTDEV) parameter to the printer device description and to set the output queue (OUTQ) parameter to *DEV.
      4.Verify that the user profile has the Print device (PRTDEV) parameter set to *WRKSTN and the output queue (OUTQ) parameter set to *DEV.
      5.Sign off the display, and sign on again.

      Note: This is not recommended because anytime the display device description is deleted and re-created, which can occur without any warning, the Print device (PRTDEV) parameter will be reset to the default value of *SYSVAL and the printer association will not take effect. Furthermore, if you connect to an IBM System i server running V6R1M0 (R610) i5/OS, the PRTDEV parameter will be reset every time the display session connects, so this method cannot be used at all. Therefore, the better way to handle this would be to specify the Print device (PRTDEV) parameter in either the user profile or through the Change Job (CHGJOB) command, or use one of the other methods listed below.

      • - Setting a Default S/36 Printer ID using the CHGS36 Command (Not Recommended)



        The Change S/36 Configuration (CHGS36) command has an option for changing the S/36 display IDs. This can be used to specify the S/36 display ID that corresponds to each i5/OS display device description. This can also be used to specify a default S/36 printer ID for each display, essentially associating a display session with one a particular printer device.

        This option has the same effect as the "Old Method" listed above. This method is no longer recommended for PC5250 display sessions, or TN5250e display sessions in V7R1M0 (7.1), V6R1M0 (6.1 or R610), V5R4M0 (5.4 or R540) or V5R3M0 (R530) i5/OS. Instead, it is recommended that the display session be setup to use the new printer association support discussed below.

        • - New Method - Recommended for V5R3M0 (R530) iSeries Access for Windows and Personal Communications



          If using PC5250 display sessions on a PC running V5R3M0 (R530) iSeries Access for Windows, or running Personal Communications (PCOM) version 5.8 or higher, the best option would be to edit your display workstation profile (*.ws) file using the new Printer Association support added to V5R3M0 (R530).

          Note: This can also work for V5R4M0 (R540) iSeries Access for Windows and V6R1M0 (R610) System i Access for Windows; however, there is an easier configuration option noted below for those releases.

          Your display workstation profile (*.ws) file can be edited using the following instructions:

          1.Select Communication > Configure on the PC5250 display session and specify a workstation ID; for example, DSP15 or JOHNS1.
          2.Select File > Save to save the changes to the PC5250 display session, then close the PC5250 display session.
          3.Use Notepad to edit the workstation profile (*.ws) file for your PC5250 display session.
          4.In the .ws file, add an "EnablePrinterAssociation" keyword in the "Telnet5250" section. Valid values for "EnablePrinterAssociation" are:

          "Y" which enables the feature
          "N" which disables the feature (Default)

          In addition, add the keyword "AssociatedPrinterDeviceName" in the "Telnet5250" section. Valid values for AssociatedPrinterDeviceName" are:

          Any string that follows these rules:
          -- No imbedded blanks
          -- Cannot start with a number
          -- Contains letters A-Z, numbers 0-9, and symbols #, @. All other symbols are not valid.

          For example:

          [Telnet5250]
          EnablePrinterAssociation=Y
          AssociatedPrinterDeviceName=PRT15
          5.Launch or re-start the PC5250 display session and allow the session to connect.
          6.Use the Display Device Description (DSPDEVD) command to confirm that the Print device (PRTDEV) parameter is set to the name of the printer device description specified on the Associate Printer dialog box.
          Notes:
          oIf the string fails validation, printer association will be disabled. Any string of more than 10 characters will be truncated to the 10-character maximum length.
          oIf the "EnablePrinterAssociation" keyword is specified, the "AssociatedPrinterDeviceName" keyword must also be specified.
          oWhen the PC5250 display session is started, the printer association will only work if the printer device name specified is present on the iSeries server.




        • - New Printer Association Support for V5R4M0 (R540) iSeries Access for Windows and V6R1M0 (R610) System i Access for Windows



          If using PC5250 display sessions on a PC running V5R4M0 (R540) iSeries Access for Windows, V6R1M0 (R610) System i Access for Windows, or V7R1M0 (7.1) System i Access for Windows, the best option would be to use the new Printer Association support.

          Your PC5250 display session can configured to use the new Printer Association support by using the following instructions:

          1.Select Communication > Configure on the PC5250 display session and specify a workstation ID; for example, DSP15 or JOHNS1.

          This screen shot shows an example of the Configure PC5250 dialog box with a workstation ID specified.  It also shows the new Printer Association button.
          2.From the Configure PC5250 dialog box, click the Printer Association button.
          3.From the Associate Printer dialog box, select Associated device name and specify the printer device description name; for example, PRT05 or IP1532.

          This screen shot shows an example of the Associate Printer dialog box with an associated printer device name specified.
          4.Click the OK button to close the Associate Printer dialog box.
          5.Click the OK button to close the Configure PC5250 dialog box.
          6.Select File > Save to save the changes to the PC5250 display session.
          7.Use the Display Device Description (DSPDEVD) command to confirm that the Print device (PRTDEV) parameter is set to the name of the printer device description specified on the Associate Printer dialog box.
          Note: When the PC5250 display session is started, the printer association will only work if the printer device name specified is present on the iSeries server.




        • - Printer Association Support for IBM i Access Client Solutions 5250 Emulation



          If using IBM i Access Client Solutions, the best option would be to use the Printer Association support built into the 5250 emulator.

          Your 5250 Display session can configured to use the Printer Association support by using the following instructions:

          1.Select Communication > Configure on the 5250 emulator and click on Associated Printer, then set Enable Associated Printer to "Yes".

          This screen shot shows an example of the Associated Printer options for the 5250 emulator.
          2.You can specify an IBM i printer device in either of two ways:

          Indirectly, by specifying the name of a 5250 Printer session that is available in the Session Manager.

          Directly, by specifying the name of an IBM i printer device.
          3a.To associate the 5250 emulator indirectly with a 5250 printer emulation session, set the Association to "Printer Session" and then select the specify printer session from the Printer Session pull down menu.

          This screen shot shows an example of setting the Association to "Printer Session".

          Next, set Close Printer with Last Session to either "Yes" or "No", set Printer Session Connection Timeout (sec) to a value other than the default of 5 seconds, if desired.

          When you launch the 5250 Display session, the emulator automatically:

          1) Launches the 5250 Printer session that you specified (if it is not already running).
          2) Obtains from the 5250 Printer session the name of the IBM i printer device that the IBM i has assigned to the 5250 Printer session.
          3) Requests that the IBM i host associate the 5250 Display session with the IBM i printer device.
          3b.To associate the 5250 emulator directly with a printer device description, set the Association to "Printer Device", set the Printer Device Name to the name of your printer device description, for example PRT01 or HP4200.

          This screen shot shows an example of setting the Association to "Printer Device".

          When you launch the 5250 Display session, the emulator automatically requests that the IBM i host associate the 5250 Display session with the specified IBM i printer device.

          Note: The printer device can be a *LAN 3812 or *LAN IPDS printer device description, the "dummy" device description for a Remote Output Queue (RMTOUTQ), a network printer that has built-in support for TN5250e printer emulation, or a printer session on any workstation. However, if the 5250 Printer session is on this same workstation, setting the Association to "Printer Device" will prevent the 5250 Printer session from being started automatically when the 5250 Display session is started.
          4.Click the OK button to close the 5250 Display session configuration settings.
          5.Answer message "ACS0021 - The profile will change and end the current session communications if you proceed. Are you sure?" by clicking on Yes.

          This screen shot shows an example of the ACS0021 message, which states that "the profile will change and end the current session communications if you proceed."
          6.Select File > Save to save the changes to the 5250 Display session.
          7.Sign onto the IBM i system and use the Display Device Description (DSPDEVD) command to confirm that the Print device (PRTDEV) parameter is set to the name of the printer device description that you specified, or to the name of the printer device description that corresponds to the 5250 Printer session that you selected.
          Note: When the PC5250 display session is started, the printer association will only work if the printer device name specified is present on the iSeries server.




        • - Recommendations for Third-Party Emulation Sessions



          If using third-party emulation software to connect to an IBM System i server running V5R3M0 (R530), V5R4M0 (R540) i5/OS and V6R1M0 (R610) i5/OS, the recommendation is to discuss this issue with your third-party vendor to have them enhance their software to take advantage of the new Printer Association support that has been added to the TN5250e specifications.

          If your third-party vendor is unable to provide an enhancement to their software in a timely manner, your best option would be to switch to using PC5250 display sessions with V5R3M0 (R530) or V5R4M0 (R540) iSeries Access for Windows, or V6R1M0 (R610) System i Access for Windows, and use one of the above methods so you can take advantage of the new Printer Association support.

        [{"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

        508997818

        Document Information

        Modified date:
        11 November 2019

        UID

        nas8N1013317