hi Rich,

Not sure if all of the answers you sought have been given in this thread or not, though I noticed several were:

1) To display Unicode on 5250, you need iSeries Access for Web. Traditional 5250 emulators only support EBCDIC (not Unicode).

2) To convert from UCS-2 (that's what 13488 is) to EBCDIC, you can use RPG's %char() BIF. It's very simple.

DisplayField = %Char(DatabaseField);

This disadvantage to this (vs. using iSeries Access for web, or using a more modern display method) is that UCS-2 supports approx 40000 different characters. EBCDIC supports about 200. That means there's a potential for your database field to contain one of the 39800 characters that simply don't exist in EBCDIC. Using a true Unicode display device (such as a well-written app or web page) doesn't have this problem.

3) Another approach that does not use RPG, is to build a logical file over the UCS-2 fields, but in the logical redefine the field as EBCDIC. In this case, the database manager will automatically do the conversion when reading from the file.

4) Finally, if you really want to code it yourself (so as to have maximum control over how the translation is done) I would recommend the iconv() API. It's a better choice than CDRCVRT/QTQCVRT, in my opinion.

If you're using ILE RPG, I could provide an example -- but you didn't say which language you're coding for.

Hope that helps...

On 4/30/2012 12:47 PM, Rich Loeber wrote:
I have a database file that contains GRAPHICS fields that appear to be
unicode. A DSPFFD shows the fields with the following settings:

Coded Character Set Identifier . . . . . : 13488
UCS2 or Unicode conversion . . . . . . . : *CONVERT

I can see the field contents when I look at them through SQL from
iNavigator, but I want to be able to show the field contents in a 5250

I've been searching the archives, but nothing jumps out at me. I'm
running V5R4 and I don't see this CCSID available when I look at the
configuration options on the terminal emulator (Personal Communcations).

Any idea where to look for this? I just want to convert the fields for
display purposes. No data entry requirements.

Rich Loeber - @richloeber
Kisco Information Systems

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].