IBM Support

Controlling Duplex Print by Modifying a Workstation Customizing Object (WSCST)

Troubleshooting


Problem

This document provides information on controlling duplex and tumble duplex print by creating a modified Workstation Customizing Object (WSCST) that changes the settings in the SMPXPRT, DUPXPRT and TUMDUPXPRT tags.

Resolving The Problem

This document provides instructions for modifying the Set Duplex Printing (DUPXPRT), Set Simplex Printing (SMPXPRT), and Set Tumble Duplex Printing (TUMDUPXPRT) tags in order to force operating system spooled files to print duplex (double-sided), simplex (single-sided), or tumble duplex (double-sided, flip on short edge) when using Host Print Transform (HPT) regardless of the settings in the spooled file attributes. This is done by retrieving and modifying a Workstation Customization Table (WSCST).

Additionally, the Customizing Paper Drawer Selection (DWRSLT) tags and any Output Bin Selection (OUTBINTBL, OUTBINTBLE and EOUTBINTBL) tags must be commented out, and settings have to be changed in the Page Size Entry (PAGSIZE) tags and paper source and page size must be specified in the Initialize Printer (INITPRT) tag. Otherwise, Host Print Transform (HPT) will send the proper controls to select duplex or tumble duplex printing, but will also send drawer selection, page size and paper source controls to the printer on each page of the spooled file, which will cause the printer to force a new piece of paper for each page, and therefore will disable duplex or tumble duplex printing.

Note: Examples in this document are using the HP PCL5 printer language. Therefore, they can be used on WSCST objects retrieved from various system-supplied WSCST objects, including *IBM4039HP, *IBM4312, *IBM4317, *IBM4332, *HP4, *HP5SI, *HP4000, *HP8000, and *LEXOPTRA.

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)

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 sections, beginning with Customizing the DUPXPRT, SMPXPRT, and TUMDUPXPRT Tags, 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 DUPXPRT, SMPXPRT, and TUMDUPXPRT Tags

The default settings for the Set Duplex Printing (DUPXPRT), Set Simplex Printing (SMPXPRT), and Set Tumble Duplex Printing (TUMDUPXPRT) tags are:

    :SMPXPRT
      DATA ='1B266C3053'X.
    :DUPXPRT
      DATA ='1B266C3153'X.
    :TUMDUPXPRT
      DATA ='1B266C3253'X.

To force all operating system spooled files to print simplex (single-sided) regardless of the settings in the spooled file attributes, set the DATA portion of each of these tags to match the current setting for the Set Simplex Printing (SMPXPRT) tag ('1B266C3053'X), as follows:

    :SMPXPRT
      DATA ='1B266C3053'X.
    :DUPXPRT
      DATA ='1B266C3053'X.
    :TUMDUPXPRT
      DATA ='1B266C3053'X.

To force all operating system spooled files to print duplex (double-sided) regardless of the settings in the spooled file attributes, set the DATA portion of each of these tags to match the current setting for the Set Duplex Printing (DUPXPRT) tag ('1B266C3153'X), as follows:

    :SMPXPRT
      DATA ='1B266C3153'X.
    :DUPXPRT
      DATA ='1B266C3153'X.
    :TUMDUPXPRT
      DATA ='1B266C3153'X.

To force all operating system spooled files to print tumble duplex (double-sided, flip on short edge) regardless of the settings in the spooled file attributes, set the DATA portion of each of these tags to match the current setting for the Set Tumble Duplex Printing (TUMDUPXPRT) tag ('1B266C3253'X), as follows:

    :SMPXPRT
      DATA ='1B266C3253'X.
    :DUPXPRT
      DATA ='1B266C3253'X.
    :TUMDUPXPRT
      DATA ='1B266C3253'X.

Caution: It is not enough to just change the settings in the SMPXPRT, DUPXPRT and TMPDUPXPRT tags. You must also follow the instructions in the following sections entitled Commenting Out the Drawer Selection (DWRSLT) Tags, Commenting Out the Output Bin Selection (OUTBINTBL, OUTBINTBLE and EOUTBINTBL) Tags, Zeroing Out the Page Size Entry (PAGSIZE) Tags, and Specifying the Paper Source and Page Size in the Initialize Printer (INITPRT) Tag. Otherwise, Host Print Transform (HPT) will send the proper controls to select duplex or tumble duplex printing but will also send drawer selection, page size, and paper source controls to the printer on each page of the spooled file. This causes the printer to force a new piece of paper for each page and, therefore, disables duplex or tumble duplex printing.


Commenting Out the Drawer Selection (DWRSLT) Tags

To control duplex print through a modified Workstation Customizing Object (WSCST), the Drawer Selection (DWRSLT) tags must be commented out. The default settings for the DWRSLT tags are:

    :DWRSLT
      DRAWER=PAPER
      DATA ='1B266C3248'X.
    :DWRSLT
      DRAWER=ENVELOPE
      DATA ='1B266C3368314F'X.
    :DWRSLT
      DRAWER=DRAWER1
      DATA ='1B266C3148'X.
    :DWRSLT
      DRAWER=DRAWER2
      DATA ='1B266C3448'X.

Once commented out, the DWRSLT tags looks similar to the following:

/*  :DWRSLT                     */
/*    DRAWER=PAPER              */
/*    DATA ='1B266C3248'X.      */
/*  :DWRSLT                     */
/*    DRAWER=ENVELOPE           */
/*    DATA ='1B266C3368314F'X.  */
/*  :DWRSLT                     */
/*    DRAWER=DRAWER1            */
/*    DATA ='1B266C3148'X.      */
/*  :DWRSLT                     */
/*    DRAWER=DRAWER2            */
/*    DATA ='1B266C3448'X.      */


Commenting Out the Output Bin Selection (OUTBINTBL, OUTBINTBLE and EOUTBINTBL) Tags

To control duplex print through a modified Workstation Customizing Object (WSCST), the Output Bin Selection (OUTBINTBL), Output Bin Selection Entry (OUTBINTBLE), and End Output Bin Selection (EOUTBINTBL) tags must be commented out (assuming there are any in the WSCST source code).

The WSCST source code for some manufacturer type and model settings do not contain Outbin Bin Selection tags, including the source code for *HP4; however, the source code for other manufacturer type and model settings do contain Output Bin Selection tags, including *HP4000. If the WSCST source code contains Output Bin Selection tags they look similar to the following:

    :OUTBINTBL.
    :OUTBINTBLE
      NUMBER= 0
      DATA ='1B266C3047'X.
    :OUTBINTBLE
      NUMBER=    1
      DATA ='1B266C3147'X.
    :OUTBINTBLE
      NUMBER=    2
      DATA ='1B266C3247'X.
    :OUTBINTBLE
      NUMBER=    3
      DATA ='1B266C3347'X.
    :OUTBINTBLE
      NUMBER=    4
      DATA ='1B266C3447'X.
    :OUTBINTBLE
      NUMBER=    5
      DATA ='1B266C3547'X.
    :OUTBINTBLE
      NUMBER=    6
      DATA ='1B266C3647'X.
    :OUTBINTBLE
      NUMBER=    7
      DATA ='1B266C3747'X.
    :OUTBINTBLE
      NUMBER=    8
      DATA ='1B266C3847'X.
    :OUTBINTBLE
      NUMBER=    9
      DATA ='1B266C3947'X.
    :OUTBINTBLE
      NUMBER=   10
      DATA ='1B266C313047'X.
    :EOUTBINTBL.

Search for OUTBINTBL and see if the WSCST source code contains Output Bin Selection tag. If it does, they must be commented out. Once commented out, the Output Bin Selection tags look similar to the following:

/*  :OUTBINTBL.                 */
/*  :OUTBINTBLE                 */
/*    NUMBER= 0                 */
/*    DATA ='1B266C3047'X.      */
/*  :OUTBINTBLE                 */
/*    NUMBER=    1              */
/*    DATA ='1B266C3147'X.      */
/*  :OUTBINTBLE                 */
/*    NUMBER=    2              */
/*    DATA ='1B266C3247'X.      */
/*  :OUTBINTBLE                 */
/*    NUMBER=    3              */
/*    DATA ='1B266C3347'X.      */
/*  :OUTBINTBLE                 */
/*    NUMBER=    4              */
/*    DATA ='1B266C3447'X.      */
/*  :OUTBINTBLE                 */
/*    NUMBER=    5              */
/*    DATA ='1B266C3547'X.      */
/*  :OUTBINTBLE                 */
/*    NUMBER=    6              */
/*    DATA ='1B266C3647'X.      */
/*  :OUTBINTBLE                 */
/*    NUMBER=    7              */
/*    DATA ='1B266C3747'X.      */
/*  :OUTBINTBLE                 */
/*    NUMBER=    8              */
/*    DATA ='1B266C3847'X.      */
/*  :OUTBINTBLE                 */
/*    NUMBER=    9              */
/*    DATA ='1B266C3947'X.      */
/*  :OUTBINTBLE                 */
/*    NUMBER=   10              */
/*    DATA ='1B266C313047'X.    */
/*  :EOUTBINTBL.                */


Zeroing Out the Page Size Entry (PAGSIZE) Tags

To control duplex print through a modified Workstation Customizing Object (WSCST), the Page Size Entry (PAGSIZE) tags must be changed to set the DATA portion to '00'X. The default settings for the PAGSIZE tags are:

    :PAGSIZE
      PAGWTH= 8352
      PAGLEN=11952
      DATA ='1B266C303141'X.  
    :PAGSIZE
      PAGWTH=10368
      PAGLEN=14544
      DATA ='1B266C303141'X.  
    :PAGSIZE
      PAGWTH=10440
      PAGLEN=15120
      DATA ='1B266C303141'X.  
    :PAGSIZE
      PAGWTH=12240
      PAGLEN=15840
      DATA ='1B266C303241'X.  
    :PAGSIZE
      PAGWTH=11952
      PAGLEN=16848
      DATA ='1B266C323641'X.
    :PAGSIZE
      PAGWTH=12240
      PAGLEN=20160
      DATA ='1B266C303341'X.

Once this change has been made, the PAGSIZE tags looks similar to the following:

    :PAGSIZE
      PAGWTH= 8352
      PAGLEN=11952
      DATA ='00'X.  
    :PAGSIZE
      PAGWTH=10368
      PAGLEN=14544
      DATA ='00'X.  
    :PAGSIZE
      PAGWTH=10440
      PAGLEN=15120
      DATA ='00'X.  
    :PAGSIZE
      PAGWTH=12240
      PAGLEN=15840
      DATA ='00'X.  
    :PAGSIZE
      PAGWTH=11952
      PAGLEN=16848
      DATA ='00'X.
    :PAGSIZE
      PAGWTH=12240
      PAGLEN=20160
      DATA ='00'X.

Specifying the Paper Source and Page Size in the Initialize Printer (INITPRT) Tag

Because the Drawer Selection (DWRSLT) tags have been commented out and the Page Size Entry (PAGSIZE) tags have been zeroed out, the paper source and page size controls must be set using the Initialize Printer (INITPRT) tag. The default setting for the Initialize Printer (INITPRT) tag is:

    :INITPRT
     DATA ='1B45'X.
   :RESETPRT
     DATA ='1B45'X.


Choose the desired paper source control from the following table:

Paper Cassette1B266C3148
Paper Cassette/Tray 21B266C3148
Manual Feed Paper1B266C3248
Manual Feed Envelope1B266C3348
Tray 11B266C3848
Optional 500 / 2000 Sheet Lower Cassette1B266C3548
MP Tray/Tray 31B266C3448
Envelope Feeder1B266C3368314F or 1B266C3648

Note: This table is derived from information on the HP Printer Control Language (PCL) found on HP's Web site. The actual controls required can vary by printer and/or manufacturer. To be certain that you are using the correct values, refer to your printer's Technical Reference or contact the printer manufacturer.

controls required can vary by printer and/or manufacturer. To be certain that you are using the correct values, refer to your printer's Technical Reference or contact the printer manufacturer.

Once the desired Paper Source and Page Size PCL controls have been determined, add them to the end of the Initialize Printer (INITPRT) tag. For example, to select Paper Cassette/Tray 2 (1B266C3148) and Letter sized paper (1B266C303241), append them to the Initialize Printer (INITPRT) tag as follows:

    :INITPRT
     DATA ='1B451B266C31481B266C303241'X.
   :RESETPRT
     DATA ='1B45'X.


If you also need to disable the perforation skip on an HP LaserJet or compatible printer, add the Perforation Skip Disable PCL control (1B266C304C) between the Reset PCL control (1B45) and the Paper Source and Page Size PCL controls, as follows:

    :INITPRT
     DATA ='1B451B266C304C1B266C31481B266C303241'X.
   :RESETPRT
     DATA ='1B45'X.



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

22311606

Document Information

More support for:
IBM i

Software version:
6.1.0

Operating system(s):
IBM i

Document number:
644477

Modified date:
18 December 2019

UID

nas8N1019493

Manage My Notification Subscriptions