IBM Support

Raster Imaging for Host Print Transform (HPT)

Troubleshooting


Problem

This document provides instructions for modifying the Raster Mode (RASTERMODE) tag to print using raster mode rather than mapping mode when using Host Print Transform (HPT).

Resolving The Problem

Note: This document used to be titled Raster Imaging for AFPDS-to-ASCII Transform.

This document provides instructions for modifying the Raster Mode (RASTERMODE) tag to print using raster mode rather than mapping mode when using Host Print Transform (HPT) to print to IBM PPDS or HP LaserJet compatible printers. This is done by retrieving and modifying a Workstation Customization Table (or WSCST).

In mapping mode, IBM OS/400 or IBM i5/OS printer commands and data are converted to similar ASCII printer commands and data. In raster mode, a raster image of the spooled file is created. Raster mode is particularly useful when the Host Print Transform (HPT) AFPDS-to-ASCII Transform is used to print *AFPDS spooled files and the text or an AFPDS overlay or page segment do not appear to be positioned correctly. Raster mode generally prints slower than mapping mode, though it can print significantly slower when printing across a low-bandwidth Wide Area Network (WAN). However, raster mode is the quickest way to handle positioning problems seen when printing in mapping mode. The other way to handle the positioning problems is to change the printer file or application so that the spooled file is generated with all text fields, overlays, page segments and bar codes positioned well within the unprintable border.

There are two different methods for selecting between mapping mode and raster mode. This document describes the new method of customizing the Raster Mode (RASTERMODE) tag, which is preferred when using R430 OS/400 and above. The old method of customizing the Printer Data Stream (PRTDTASTRM) tag must be used prior to R430 OS/400. It is still available; however, it is not recommended when using R430 OS/400 or higher. Instructions for using the old method are found in the following document:

N1019081: Raster Imaging using the Printer Data Stream (PRTDTASTRM) Tag

This document was last updated on 24 October 2013.

Caution: These instructions are provided as is. Any assistance with editing the Workstation Customization Table must be done through a consulting agreement.

The following are the basic steps for creating and using a Workstation Customization Object (WSCST). Regardless of the particular issues you are attempting to resolve, these steps must always be taken. This information is intended to provide a 'quick start' to creating a WSCST object for users who have at least some familiarity with creating them and with configuring printers.

Note: Additional, in-depth details for creating a WSCST object can be found in the following document:

N1010140: Instructions for Modifying a Workstation Customizing Object (WSCST) Database 'DCF Technotes (IBM i)', View 'Products', Document 'Instructions for Modifying a Workstation Customizing Object (WSCST)'

The following are the basic 'quick start' steps.

Step 1: Retrieve the WSCST source code. Type the following command on the operating system command line:

Important Note: Use the Manufacturer type and model (MFRTYPMDL) that is appropriate for your printer. Also, the Source member (in the following example, HP4) is a name that is appropriate to your customizing object. This is what you will be calling your workstation customizing object in Step 3.

RTVWSCST DEVTYPE(*TRANSFORM) MFRTYPMDL(*HP4) SRCMBR(HP4)
         SRCFILE(QGPL/QTXTSRC)

Press the Enter key.

Step 2: Edit the source code by using PDM or SEU:
oTo use PDM, on the operating system command line type the following:

WRKMBRPDM FILE(QGPL/QTXTSRC) MBR(HP4)

Press the Enter key. Select Option 2 to edit.
oTo use SEU, on the operating system command line type the following:

STRSEU SRCFILE(QGPL/QTXTSRC) SRCMBR(HP4)

Press the Enter key.
Make any changes necessary to the WSCST object source code. Refer to the following section Customizing the Raster Mode (RASTERMODE) Tag to make your changes, then save and exit. Continue with Step 3.

Step 3: Create the WSCST object using the CRTWSCST command. On the operating system command line type the following:

Important Note: Match the SRCMBR name from Step 1 to the WSCST object name that is created in this step.

CRTWSCST WSCST(QGPL/HP4) SRCFILE(QGPL/QTXTSRC)

Press the Enter key.

Step 4: Add the WSCST to the printer configuration by using the Change Device Print command (CHGDEVPRT), the Change Output Queue command (CHGOUTQ), or by changing the PC5250 printer emulation session configuration.
oTo add the WSCST to a device description, on the operating system command line type the following:

CHGDEVPRT DEVD(device_name) TRANSFORM(*YES) MFRTYPMDL(*WSCSTLETTER)
          WSCST(QGPL/HP4)

Press the Enter key.
oTo add the WSCST to a remote output queue description, on the operating system command line type the following:

CHGOUTQ OUTQ(queue_name) TRANSFORM(*YES) MFRTYPMDL(*WSCSTLETTER)
        WSCST(HP4)

Press the Enter key.
oTo add the WSCST to a PC5250 printer emulation session, do the following:

a In the PC5250 printer session, click on Communication > Configure.
b Click on the Setup button.
c In the Configure PC5250 Printer Emulation window, select the box next to Transform Print Data to ASCII on the iSeries and select the Printer Model value of *WSCST.
d In the same window, specify the name of the WSCST in the Customizing Object parameter and the library where it is found in the Library parameter (for example, Customizing Object HP4 and Library QGPL).
e Click OK three times.
f Click File > Save to save the configuration.

Note: If any changes are made to the WSCST object source code after the CRTWSCST command has been issued, it is necessary to issue the CRTWSCST command again. The printer writer must be ended and restarted for the changes to take effect.

Document N1019007 contains a save file with pre-built Workstation Customizing Objects (WSCSTs) for some of the most requested and most helpful customizations. The attached save file includes a pre-built WSCST object called PCLRASTER that can be used to print *AFPDS spooled files in Raster Mode, and a pre-built WSCST object called PCLRASTR2 that can be used to print both*SCS and *AFPDS spooled files in Raster Mode.

For more information, please refer to the following document:

N1019007: Pre-Built Workstation Customizing Objects (WSCSTs) from IBM iSeries Remote Technical Support

Note: The PCL5RASTER and PCL5RASTR2 WSCST objects are based on the *HP4, *HP5, *LEXOPTRAT, and *INFOPRINT1140 manufacturer types and models (MFRTYPMDLs). The drawer selection tags in the PCL5RASTER WSCST object may not your specific printer model. If switching to use this pre-built WSCST object causes spooled files to pull from the wrong paper tray, then it would be better to create you own modified WSCST object based on the MFRTYPMDL setting that you are currently using with your printer.


Customizing the Raster Mode (RASTERMODE) Tag

The Raster Mode (RASTERMODE) tag was added in R430 OS/400. This new method is recommended because it allows mapping mode and raster mode to be selected independently, depending on whether the Printer device type (DEVTYPE) parameter in the spooled file attributes is set to *SCS or *AFPDS spooled files. For example, mapping mode can be used for *SCS spooled files, and raster mode can be used for *AFPDS spooled files.

The old method, customizing the Printer Data Stream (PRTDTASTRM) tag, only allows mapping mode and raster mode to be selected for all spooled files. Therefore, with the PRTDTASTRM tag, mapping mode can be selected for both *SCS and *AFPDS spooled files, or raster mode can be selected for both.


Changing the SCS and AFP Parameters in the Raster Mode (RASTERMODE) Tag

The default setting of the Raster Mode (RASTERMODE) tag is as follows:

    :RASTERMODE
      SCS=NO
      AFP=NO.

This indicates that mapping mode should be used for both SCS or AFPDS spooled files. To use mapping mode for the SCS-to-ASCII Transform, and raster mode for AFPDS-to-ASCII Transform, leave the SCS parameter set to NO and change the AFP parameter to YES, for example:

    :RASTERMODE
      SCS=NO
      AFP=YES.

To use raster mode for both the SCS-to-ASCII Transform and the AFPDS-to-ASCII Transform, set both the SCS and AFP parameters to YES, for example:

    :RASTERMODE
      SCS=YES
      AFP=YES.

Note: Not all data streams support raster mode. Therefore, SCS=YES and AFP=YES can be specified only when the DATASTREAM parameter in the Printer Data Stream (PRTDTASTRM) tag is set to HPPCL4, HPPCL5, IBMPPDS3, or IBMPPDS4.


Testing the Use of Raster Mode with *AFPDS Spooled Files without Creating a Modified WSCST Object

There is a way to test the use of Raster Mode with *AFPDS spooled files without creating a modified Workstation Customizing Object (WSCST) that changes the settings of the Raster Mode (RASTERMODE) tag. The system-supplied Manufacturer type and model (MFRTYPMDL) settings of *IBM4076, *HP310, *HP320, *HP500, *HP520, and *HP540, and the corresponding system-supplied WSCST object of QWPHPDSKJT already have the RASTERMODE tag setup with SCS=NO and AFP=YES.

Note: A quick test can be done by using the system-supplied Manufacturer type and model (MFRTYPMDL) setting of *IBM4076, *HP310, *HP320, *HP500, *HP520 or *HP540 (which use the system-supplied QWPHPDSKJT *WSCST object) or use *HP550C or *HP560C (which use the system-supplied QWPHP550C *WSCST object) all of which are setup to use raster mode for *AFPDS spooled files. Another option would be to use the MFRTYPMDL setting of *HPDBCS (which uses the system-supplied QWPHPDBCS *WSCST object) which is setup to use raster mode for both *SCS and *AFPDS spooled files.

Therefore, Raster Mode can be tested with a *LAN 3812 printer device description or a Remote Output Queue (RMTOUTQ) by setting the MFRTYPMDL parameter to *IBM4076, *HP310, *HP320, *HP500, *HP520, or *HP540. Raster Mode can likewise be tested in a PC5250 printer session by setting the Printer model to *IBM4076, *HP310, *HP320, *HP500, *HP520, or *HP540, or by setting the Printer Model to *WSCSTLETTER and the Customizing object to QWPHPDSKJT in library QSYS.

If raster mode is needed for *SCS spooled files as well as *AFPDS spooled file, the MFRTYPMDL parameter can be set to *HPDBCS. However, the Paper source 1 (PPRSRC1) and Paper source 2 (PPRSRC2) parameters should typically be set to *LETTER since *HPDBCS defaults to using A4 sized 210mm x 297mm (8.3 x 11.7 inch) paper. If using a PC5250 printer session or a RMTOUTQ, use *WSCSTLETTER with the system-supplied QWPHPDBCS *WSCST object in library QSYS instead.

Note: The IBM 4076 ExecJet printer supports HP PCL4, not HP PCL5. Host Print Transform (HPT) does not have full functionality when outputting HP PCL4; therefore, *IBM4076 is not recommended for use in a production environment when printing on a printer that supports HP PCL5, PCL5c, PCL5e or PCL6.

To create the WSCST object and implement it, perform steps 3 and 4 (above).

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

8702144

Document Information

Modified date:
18 December 2019

UID

nas8N1010127