IBM Support

IBM i Access for Windows: Adding the Host Print Screen Function to the PC5250 Tool Bar

Troubleshooting


Problem

This document provides instructions for adding the host print screen function to the tool bar in PC5250 when using 7.1 or 6.1 IBM i Access for Windows, V5R3M0 (R530) or V5R2M0 (R520) IBM iSeries Access for Windows, or V5R1M0 (R510) Client Access/400 Express for Windows (5722XE1).

Resolving The Problem

Important Note: This document discusses IBM i Access for Windows, as well as older versions of "Client Access" including System i Access for Windows, iSeries Access for Windows, Client Access for Microsoft Windows 95 and Windows NT, and Client Access Express. 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, these terms may be used interchangeably. Where a difference is important, the version of the product is used to identify the differences.


The host print screen function can be accessed by pressing CTRL + PAUSE on the keyboard when using the default as400.kmp and pcswinkb5.kmp keyboard mapping files that are shipped with iSeries Access for Windows or by right clicking on the PC5250 display session to bring up the pop-up keypad, clicking on "Pad 2" and then clicking on the "HostPrn" button. However, the host print screen function can also be added to the PC5250 tool bar on your display sessions.

This document provides instructions for adding the host print screen function to the tool bar in PC5250 when using IBM i Access for Windows. The host print screen function can then be used rather than, or in addition to, the local print screen function that is already provided through the tool bar.

This document was last updated on 4 April 2014.





The local print screen function allows you to print directly from the PC5250 program on your PC to a printer that is configured on your PC. This includes printers that are:
oDirectly attached to the PC, printers that are attached to the IBM System i products;
oPrinters that are attached to another PC but are configured through the IBM OS/400 or IBM i5/OS (emulated printers);
oPrinters that are attached to the network or a network server but are not configured through the OS/400 or i5/OS.
The host print screen function creates a spooled file in OS/400 or i5/OS that can be routed to an operating system printer device description or output queue. This includes printers that are directly attached to the System i, printers that are attached to another PC but are configured through OS/400 or i5/OS (emulated printers), and printers that are attached to the network or a network server and are also configured through OS/400 or i5/OS (for example, through a remote output queue).

The advantages of using the Host Print Screen function are:
oThe output is slightly different from the local print screen function and, therefore, may be preferred.
oThe host print screen function is faster than the local print screen function.
oIf printing to an OS/400 or i5/OS printer, the host print screen function is much easier to configure since it prints directly to an OS/400 or i5/OS output queue. To use the local print screen function to an OS/400 or i5/OS printer, you would need to first configure a network printer so you can print from Windows applications to your OS/400 or i5/OS printer.
oThe host print screen function uses far fewer resources on the PC than does the local print screen function.
The steps to adding the host print function to the PC5250 tool bar are: (1) Creating a macro that performs the host print function, (2) Adding the macro to the PC5250 tool bar, and (3) Saving both the tool bar and the PC5250 display session.

Once this is done, you can easily add this same tool bar to other PC5250 display sessions on the PC (or on any other PC).

Creating the HostPrn Macro

To create the HostPrn macro, do the following:
1.Bring up your PC5250 display session.
2.Select Edit > Preferences > Macro/Script... on the menu bar.
This print screen shows an example of selecting Edit > Preferences > Macro/Script... on the menu bar.
3.Click on the Customize button.
This print screen shows an example of the Macro/Script Setup dialog box.
4.On the Customize Macro dialog box, click on the down arrow next to Function, scroll down, and select Host Print.
5.Click on the Add button. At this point, the Macro Statements should read [host print].
This print screen shows an example of the Customize Macro/Script dialog box.
6.Select File > Save on the menu bar, then save the macro with the name HostPrn.mac. It is recommended that you specify a description, such as Host Print Screen.
This print screen shows an example of the Save Macro/Script File as dialog box.
7.Close the Customize Macro/Script (or Customize Macro) dialog box, then close the Macro/Script Setup (or Macro Setup) dialog box.

Adding the HostPrn Macro to the PC5250 Tool Bar

To add the HostPrn Macro to the PC5250 tool bar, do the following:
1.Use the right mouse button to click on the tool bar and select Create Item on the pop-up (or context) menu.

Note: The location of the new tool bar item will depend on the location of the cursor at the time of the right-click. For example, to add the new tool bar item after the Local Print Screen (PrtScrn) item, position the cursor between the PrtScrn item and the Copy item and then click on the right mouse button.
2.On the Create Tool Bar Item dialog box, click on the Macro/Script tab, select the HostPrn macro, and click on the Customize button.
This print screen shows an example of the Create Tool Bar Item dialog box.
3.From the Customize dialog box, set the Tool bar text to "HostPrn" and the Description to "Host Print Screen".
This print screen shows an example of the Customize dialog box.
4.If desired, use the Create or Load File button under the Picture section to create a special icon for the Host Print Screen button on the tool bar.
5.Click on OK on the Customize dialog box.
6.If your PC5250 display session is set up to show pop-up descriptions, the words "Host Print Screen" will briefly be displayed whenever you place your cursor on the Host Print Screen button.
This print screen shows an example of the HostPrn, or Host Print Screen, button that has been added to the PC5250 tool bar.


Replacing the Local Print Screen Function with HostPrn Macro on the PC5250 Tool Bar

If you prefer, you can replace the local print screen function with the HostPrn Macro on the PC5250 tool bar.

Note: This does not eliminate the local print screen function, it just changes the button on the tool bar so that it does the host print screen function instead. The local print screen function would still be accessible by selecting File > Print Screen from the menu bar.

To do this, use the instructions above to add the HostPrn macro to the tool bar and then use the right mouse button to click on the PrtScrn button on the tool bar and select Delete Item on the pop-up (or context) menu.

This print screen shows an example of the PC5250 tool bar after the PrtScrn, or Local Print Screen, button has been removed.


Saving the PC5250 Tool Bar

To save the PC5250 tool bar, do the following:
1.Select Edit > Preferences > Tool Bar > Save... on the menu bar.
2.Save the tool bar with whatever name you choose. For example, you could use the name ToolBar.bar.
This print screen shows an example of the Save Tool Bar dialog box.
3.Select File > Save on the menu bar to save the PC5250 display session.


Using the PC5250 Tool Bar with Other PC5250 Display Sessions

To use the PC5250 tool bar with other PC5250 display stations, do the following:
1.Bring up another PC5250 display session.
2.Select Edit > Preferences > Tool Bar > Load on the menu bar.
3.Click on the name of the tool bar, for example ToolBar.bar.
This print screen shows an example of the Load Tool Bar dialog box.
4.Click on OK.
5.Select File > Save on the menu bar to save the PC5250 display session.


Using the PC5250 Tool Bar on Other PCs

This can also be used to set up the tool bar for PC5250 display sessions on other PCs. Copy the macro (HostPrn.mac) and tool bar (ToolBar.bar) files to the other PCs, and repeat the steps under Using the PC5250 Tool Bar with Other PC5250 Display Sessions.

The macro and tool bar files normally reside in the following folder:
IBM i Access for Windows (Windows 7 or Windows 8.1)C:\Program Files (x86)\IBM\Client Access\Emulator\private
IBM i Access for Windows (Windows XP)C:\Program Files\IBM\Client Access\Emulator\private
IBM iSeries Access for WindowsC:\Program Files\IBM\Client Access\Emulator\private
Client Access Express for WindowsC:\Program Files\IBM\Client Access\Emulator\private

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

24261248

Document Information

Modified date:
18 December 2019

UID

nas8N1017258