IBM Support

Customizing the Code Page 259 to 899 Translation Table

Troubleshooting


Problem

This document provides instructions for using your own translation table for converting Code Page 259 (EBCDIC Symbol Set 7) to Code Page 899 (ASCII Symbol Set) when using Host Print Transform (or HPT) with ASCII code page support 899 set to *YES.

Resolving The Problem

This document provides instructions for using your own translation table for converting Code Page 259 (EBCDIC Symbol Set 7) to Code Page 899 (ASCII Symbol Set) when using Host Print Transform (or HPT) with ASCII code page support 899 set to *YES.

This is done by retrieving and modifying a Workstation Customization Table (WSCST) and changing the values in the Set Code Page (CODEPAGE) and EBCDIC-to-ASCII Table Entry (EBCASCTBLE) tags.

For information on customizing the Code Page 37 to 850 or Code Page 37 to 437 translation tables, refer to the following documents:

N1010136: Customizing the Code Page 37 to 850 Translation Table
N1010137: Customizing the Code Page 37 to 437 Translation Table

This document was last updated on 5 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 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 section Customizing the Code Page 259 to 899 Translation Table 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 Code Page 259 to 899 Translation Table

To make a change in the translation table, you must make an entry for each code point. This is a tedious job but can be done. Type (or cut and paste) the following after the :EASCCPINFO tag or before the :EWSCST tag which is the last tag in the WSCST source member:

   :EBCASCTBL.
   :EBCASCTBLE
     EBCDICCP = 259
     ASCIICP  = 899
     DATA =
    /* -0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F */
      '20DE838485A0B08687A45B2E3C282B21'X      /* 4- */
      '268288898AA18C8B8DB15D242A293B5E'X      /* 5- */
      '2D2FB28EB3B4B58F80A57C2C255F3E3F'X      /* 6- */
      'B690B7B8B9BA20BCBD603A2340273D22'X      /* 7- */
      'BE616263646566676869AEAFBFC0C1C2'X      /* 8- */
      'C36A6B6C6D6E6F707172A6A791C492C5'X      /* 9- */
      'C67E737475767778797AADA8C7C8C9CA'X      /* A- */
      '9B9C9D9E9FE0CBACABCCAACDCECFD0D1'X      /* B- */
      '7B414243444546474849D2939495A2D3'X      /* C- */
      '7D4A4B4C4D4E4F505152D4968197A398'X      /* D- */
      '5CDF535455565758595AD5D699D7D8D9'X      /* E- */
      '30313233343536373839DADB9ADCDD00'X.     /* F- */
   :EEBCASCTBL.


The values in the above EBCASCTBLE (EBCDIC to ASCII Table Entry) tag are obtained from the Q259BF899 EBCDIC to ASCII translation table. The following Work with Tables (WRKTBL) command can be used to view this translation table:

WRKTBL TBL(QUSRSYS/Q259BF899)

The table is setup for EBCDIC with the first character of the code represented on the right column (/* 4- */), and the second character of the hex code in the top line /* -0-1-2 .... */. The first translation in the example is an EBCDIC Space character (X'40'), which is translated to an ASCII Space character (X'20').

Notes:
1.The entire table must be typed to change even a single code point. If you are viewing this document online or if it has been e-mailed to you, it is easiest to copy lines from this document and paste them into your source member. If this file has been faxed to you, the table will have to be typed exactly as shown above. If the table is not typed correctly, it could cause some characters in your operating system spooled files to be translated to the wrong ASCII character, which would cause them to print incorrectly.
2.The above EBCASCTBLE tag shows the base settings for translating EBCDIC Code Page 259 to ASCII Code Page 899. The values can be changed as needed, depending on the symbol set used in the Set Code Page (CODEPAGE) tag for Code Page 899. It is recommended that you try to map as close to Code Page 259 as possible. However, if a character is not on the code page, you can substituted any code point that you need.

Adding a Set Code Page (CODEPAGE) Tag for Code Page 259

If trying to print to an HP PCL5 or compatible printer and not getting the symbols as expected, add a Set Code Page (CODEPAGE) tag for Code Page 899. For example:

:CODEPAGE
 CODEPAGE = 899
 DATA  = '1B2831394D'X.


This tag will cause Host Print Transform (HPT) to send a Symbol Set Selection PCL5 control to the printer when printing a symbol. In the above example, the DATA is set to '1B2831394D'X which selects a primary symbol set of Symbol. Values for the DATA portion of the CODEPAGE tag include:
Primary Symbol SetDATA Value
PS Math'1B28354D'X.
Ventura Math'1B28364D'X.
Math-8'1B28384D'X.
Symbol'1B2831394D'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

8692625

Document Information

Modified date:
18 December 2019

UID

nas8N1010139