IBM Support

Transform Services : Additional Considerations for Generating PDF Files That Contain Both DBCS and SBCS Data

Troubleshooting


Problem

Transform Services : Additional Considerations for Generating PDF Files That Contain Both DBCS and SBCS Data

Resolving The Problem

For reference:
Example SBCS (Single-Byte Character Set) and DBCS (Double-Byte Character Set) data
SBCS is Single-Byte Character Set.
DBCS is Double-Byte Character Set.
Requirements:
  • Make sure the latest Recommended Fixes for Print, which includes the fixes for Transform Services (product 5770TS1) are applied, as well as the latest cumulative.
  • It is necessary that the appropriate fonts installed on the system.  Outline fonts are recommended.
    • For *SCS spooled files, outline fonts are required for DBCS data.  Outline fonts are purchasable fonts provided in the AFP Font Collection, product 5733-B45:
      Resource
      ID
      Option
      Feature
      Description Library
      5733B45
      *BASE
      5050
      AFP Font Collection V3.1 for IBM i QFNTB45
      5733B45
      2
      5076
      AFP Outline Fonts - Japanese QFNT68
      5733B45
      3
      5077
      AFP Outline Fonts - Korean QFNT68
      5733B45
      4
      5078
      AFP Outline Fonts - Simplified Chinese QFNT68
      5733B45
      5
      5079
      AFP Outline Fonts - Traditional Chinese QFNT68
      Contact your IBM Business Partner or Marketing Representative for pricing.
    • For *AFPDS spooled files, outline or raster fonts can be used.  DBCS raster fonts are provided by product 5769-FN1, Advanced Function Printing DBCS Fonts/400. 
      Resource
      ID
      Option
      Description Library
      5769FN1
      1
      AFP DBCS Fonts - Japanese QFNT61
      5769FN1
      2
      AFP DBCS Fonts - Korean QFNT62
      5769FN1
      3
      AFP DBCS Fonts - Traditional Chinese QFNT63
      5769FN1
      4
      AFP DBCS Fonts - Simplified Chinese QFNT64
      5769FN1
      5
      AFP DBCS Fonts - Thai QFNT65

      DBCS raster fonts can also be purchased from the AFP Font Collection, product 5733-B45:
      Resource
      ID
      Option
      Feature
      Description Library
      5733B45 *BASE 5050 AFP Font Collection V3.1 for IBM i QFNTB45
      5733B45
      8
      5082
      AFP Raster Fonts - Japanese QFNT67
      5733B45
      9
      5083
      AFP Raster Fonts - Korean QFNT67
      5733B45
      10
      5084
      AFP Raster Fonts - Simplified Chinese QFNT67
      5733B45
      11
      5085
      AFP Raster Fonts - Traditional Chinese QFNT67
      Contact your IBM Business Partner or Marketing Representative for pricing.

      Helpful information:  
      Coded fonts beginning with "X0" are raster fonts.  Coded fonts beginning with "XZ" are outline fonts.
      Font character sets beginning with "C0" are raster fonts.  Font character sets beginning with "CZ" are outline fonts.
  • The only way to get DBCS and SBCS data into the same spooled file is using DDS to create a printer file.  Fonts will need to be specified at the record or field level.  Use IGCCDEFNT DDS keyword for the DBCS data and CDEFNT DDS keyword for the SBCS data.  Or, use Unicode and the FONTNAME DDS keyword to reference a TrueType font.   For more information on the DDS keywords, use Programming DDS for printer files.
    NOTE:  
     A print screen or printing data from a physical file or data area that contains both SBCS and DBCS data will not work.  These actions use IBM-supplied printer files. 
  • Ensure the Unprintable Character Action (RPLUNPRT) parameter in the printer file is set to *NO and verify User specified DBCS data (IGCDTA) is *YES
  • For *AFPDS spooled files, specify a DBCS coded font (IGCCDEFNT) or coded font (CDEFNT) in the printer file, if not using an externally described printer file that includes the IGCCDEFNT or CDEFNT DDS keywords.  See the section titled *SCS and *AFPDS Spooled File Considerations for more information.
  • For *SCS spooled files, specify the appropriate Character identifier (CHRID) from the table in the Considerations when mixing DBCS and SBCS text section.  See the section titled *SCS and *AFPDS Spooled File Considerations for more information.
  • Test all available CTX Form Workstation Customization Objects (WSCST) for Transform Services to see which one works the best for the spooled file.
    QCTXPDFMBD
    QCTXPDFMB2
    QCTXPDFWT 
    QCTXPDFWT2
    QCTXPDF2  
    Development recommends QCTXPDFMBD WSCST for DBCS *SCS spooled files, and QCTXPDFMB2 WSCST for DBCS *AFPDS spooled files.

    NOTE: Embedding fonts renders a larger PDF. Fonts are embedded based on the CTX Form Workstation Customization Object (WSCST) used. Refer to document Language Support for Host Print Transform and Transform Services, for more information on the available WSCST objects for Transform Services.
  • Ensure the job generating the spooled file is running with a CCSID other than 65535, which does not allow for translation.  Transform Services infers a DBCS CCSID from the SBCS CHRID when the IGCDTA is *YES. Successful attempts included CCSID 37, though one can also select the appropriate CCSID from the table in the section titled Considerations when mixing DBCS and SBCS text.

*SCS and *AFPDS Spooled File Considerations
Transform Services handles *SCS and *AFPDS spooled files differently.
  • For *AFPDS spooled files, Transform Services explicitly uses the DBCS Coded Font (IGCCDEFNT) and Coded Font (CDEFNT) parameters in the printer file or DDS keywords to determine which fonts to use.  Development recommends QCTXPDFMB2 WSCST for DBCS *AFPDS spooled files.
  • For *SCS spooled files, Transform Services uses the Character ID (CHRID), Characters Per Inch (CPI) and Font Global Identifier (FGID) in the printer file and will use AFP outline fonts, if installed, for the SBCS data. Select the appropriate CHRID from the table in the Considerations when mixing DBCS and SBCS text section.  If outline fonts are not installed on the system, use a CTX Form WSCST object that ends with 2 (QCTXPDF2, QCTXPDFMB2, or QCTXPDFWT2) and the SBCS data will be rendered with the standard font references rather than be embedded.  Outline fonts are required for DBCS data.  If outline fonts are installed, development recommends QCTXPDFMBD WSCST for DBCS *SCS spooled files.
Considerations when mixing DBCS and SBCS text
  • If mixing both DBCS and SBCS data, the printer file must be *AFPDS.
  • Mixed DBCS and SBCS text may overlap depending on the type of fonts used. Consider the following to prevent overlapping:
    • If a raster font is used for the IGC Coded Font (IGCCDEFNT), use an outline font instead.
    • Embed the fonts.
    • Use the POSITION DDS keyword to position the text.
    • Do not specify an AFP font for the SBCS characters. Instead specify a FONT or CPI value that is half the width of the IGCCDEFNT used. The Character ID (CHRID) value must be specified in the printer file to represent the SBCS character set of the language so that Transform Services will use the appropriate character set for the SBCS text.

      This table contains the valid Character ID (CHRID) values to the SBCS portion of the Mixed-CCSIDs supported on IBM i:
      Language CCSID SBCS or
      DBCS
      Character
      Set
      Code
      Page
      Korean 933 SBCS
      933
      833
      DBCS
      934
      834
      SBCS
      1173
      833
      DBCS
      1050
      834
      Simplified Chinese 935 SBCS
      1174
      836
      DBCS
      937
      837
      Traditional Chinese 937 SBCS
      1175
      37
      DBCS
      935
      835
      Japanese 5026 Katakana SBCS
      1172
      290
      DBCS
      370
      300
      5035 Latin SBCS
      1172
      1027
      DBCS
      370
      300

Keywords for searching: 5770TS1 5761TS1 Single Double Data IGCCDEFNT CDEFNT CPI CHRID FGID PDF QCTXPDF QCTXPDFMB QCTXPDFWT QCTXPDF2 QCTXPDFMB2 QCTXPDFWT2

[{"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":"7.4.0"}]

Document Information

Modified date:
03 November 2021

UID

nas8N1021683