| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

DBCS

Page history last edited by PBworks 16 years, 11 months ago

This is based on some test DBCS data currently resident on CAT31 (SHAWM/TESTDBCS).

 

RPG program XMLEX3 writes out the XML output to IFS file dbcs.xml in current IFS directory, having first trimmed the XML message to the correct length.

 

Example DBCS XML uses CCSID 933 which is the correct CCSID for Korean mixed DBCS.

 

The data is read using a view created with the following SQL statement (with CAST):

CREATE VIEW SHAWM/TESTDBCSV (ABAN8, ABALKY, ABTAX, ABALPH, ABDC) AS SELECT ABAN8, ABALKY, ABTAX, cast(ABALPH as char(40) ccsid 933), abdc FROM testdbcs

 

Before running,

CHGJOB CCSID(933)

(essential)

 

Uses DDSXMLUtil Java code.

 

One fun little gotcha to be aware of is that the length in bytes of a DBCS data item on the iSeries is actually different to the length in bytes of the same item inside Java where the data is held in Unicode. In my example the xmlBuffer Java variable, when returned as a function result to RPG (via an automatic conversion from Unicode to code page 933) changes in length.

Comments (0)

You don't have permission to comment on this page.