IBM Support

Changing the Font in the :CPI Tag

Troubleshooting


Problem

This document provides instructions for sending different font controls to an IBM® or Epson compatible dot matrix or ink jet printer when using Host Print Transform (HPT).

Resolving The Problem

This document provides instructions for sending different font controls to an IBM® or Epson compatible dot matrix or ink jet printer when using Host Print Transform (HPT).

This is done by retrieving and modifying a Workstation Customization Table (WSCST) and adding or modifying the Set Characters Per Inch (CPI) tags to specify a font string, or font selection control, for a given Characters Per Inch (CPI).

Note: Examples in this document are using the IBM PPDS printer language.

This document was last updated on 19 November 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 issue(s) 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 section Changing the CPI Tag to Print 10 CPI Rather Than 16.7 (or 17.1) CPI or Changing the CPI Tag to Print 16.7 (or 17.1) CPI Rather Than 10 CPI 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(*WSCST)
          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(*WSCST) 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.

Changing the CPI Tag to Print 10 CPI Rather Than 16.7 (or 17.1) CPI

Once you are editing the workstation customizing object source using either PDM or SEU, find the Set Characters Per Inch (CPI) tags. The following is an example of how to print 16.7 CPI spooled files at 10 CPI. This only applies to printers that use the :CPI tag, such as IBM Proprinters, Epson FX and LQ printers, and Okidata Microline printers.

Default Settings for IBM Proprinter 4201-1Modified Settings for IBM Proprinter 4201-1
    :CPI
     CPI=166
     DATA ='1B57001B46120F'X.
    :CPI
     CPI=166
     DATA ='1B57001B4612'X.
Default Settings for Epson FX-1170Modified Settings for Epson FX-1170
    :CPI                  
      CPI=166            
      DATA ='14121B500F'X.
    :CPI                  
      CPI=166            
      DATA ='14121B50'X.

The DATA string can vary depending on the WSCST source code that you retrieved. However, in every case, the '0F' at the end of the DATA string causes the condensed font. In this particular case, the X'1B4612' is an ASCII control that selects a 10 CPI font. If changes made do not cause a change in the output, then it is possible that this tag is not being used in the transform. If your printer is capable of a hex dump, view the datastream and search for the controls in the beginning of the datastream. If you find the X'1B' controls but not these, you are not using the tag and will have to look elsewhere.

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

Changing the CPI Tag to Print 16.7 (or 17.1) CPI Rather Than 10 CPI

The following is an example of how to print 10 CPI spooled files at 16.7 CPI. This applies only to printers that use the :CPI tag, such as IBM Proprinters, Epson FX and LQ printers, and Okidata Microline printers.

Copy the original settings for the :CPI tag where CPI=166, then change the first "CPI=166" to "CPI=10".

Default Settings for IBM Proprinter 4201-1Modified Settings for IBM Proprinter 4201-1
    :CPI
     CPI=166
     DATA ='1B57001B46120F'X.
    :CPI
     CPI=10
     DATA ='1B57001B46120F'X.

    :CPI
     CPI=166
     DATA ='1B57001B46120F'X.
Default Settings for Epson FX-1170Modified Settings for Epson FX-1170
    :CPI                  
      CPI=166            
      DATA ='14121B500F'X.
    :CPI
     CPI=10
     DATA ='14121B500F'X.

    :CPI                  
      CPI=166            
      DATA ='14121B500F'X.

The DATA string can vary depending on the WSCST source code that you retrieved. However, in every case, the original settings for the :CPI tag where CPI=166 will always be set up for printing in a condensed font, so the new settings for CPI=10 will be set up to do the same.

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

8691727

Document Information

Modified date:
18 December 2019

UID

nas8N1010141