IBM Support

Raster Imaging Using the Printer Data Stream (PRTDTASTRM) Tag

Troubleshooting


Problem

This document provides instructions for modifying the Printer Data Stream (PRTDTASTRM) tag to print using raster mode rather than mapping mode when using Host Print Transform (HPT). This method is only recommended when using R420 and earlier versions of IBM OS/400.

Resolving The Problem

This document provides instructions for modifying the Printer Data Stream (PRTDTASTRM) 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 and can print much slower when printing across a low-bandwidth Wide Area Network (WAN), but the output will match the results that would be received when the *AFPDS spooled file is printed to an IPDS printer using IBM Print Services Facility/400 (PSF/400) or when it is converted to Adobe PDF format using the IBM Infoprint Server for iSeries product.

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

N1010127: Raster Imaging for Host Print Transform (HPT)

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.

Basic Steps for Creating and Using a Workstation Customization Object

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 Printer Data Stream (PRTDTASTRM) 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.

Customizing the Printer Data Stream (PRTDTASTRM) Tag

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. To select mapping mode and raster mode independently, depending on whether the Printer device type (DEVTYPE) parameter in the spooled file attributes is set to *SCS or *AFPDS spooled files, customize the Raster Mode (RASTERMODE) tag instead.

Note: The Raster Mode (RASTERMODE) tag is available only in R430 OS/400 and above. Therefore, before R430, the Printer Data Stream (PRTDTASTRM) tag must be customized.


Changing the DATASTREAM Parameter in the Printer Data Stream (PRTDTASTRM) Tag

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

The default setting of the Printer Data Stream (PRTDTASTRM) tag for an HP LaserJet 5si printer is as follows:

    :PRTDTASTRM
      DATASTREAM=HPPCL5.

The DATASTREAM parameter settings of HPPCL4, HPPCL5, IBMPPDS3, and IBMPPDS4 indicate mapping mode. To indicate raster mode instead, add an "I" to the end of DATASTREAM values. The "I" specifies that an image is sent to the printer. Examples for each supported DATASTREAM values are as follows:

Default Setting:Modified Setting:
    :PRTDTASTRM
      DATASTREAM=HPPCL4.
    :PRTDTASTRM
      DATASTREAM=HPPCL4I.
    :PRTDTASTRM
      DATASTREAM=HPPCL5.
    :PRTDTASTRM
      DATASTREAM=HPPCL5I.
    :PRTDTASTRM
      DATASTREAM=IBMPPDS3.
    :PRTDTASTRM
      DATASTREAM=IBMPPDS3I.
    :PRTDTASTRM
      DATASTREAM=IBMPPDS4.
    :PRTDTASTRM
      DATASTREAM=IBMPPDS4I.

To create the WSCST object and implement it, you should 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

386121218

Document Information

Modified date:
18 December 2019

UID

nas8N1019081