× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> From: Hall, Philip
> 
> I hope you didn't reinvent all the conversion tables which is tedious
and
> often error prone, and I assume you simply use at worst the QDCXLATE
API,
> or at best (if possible) the C runtime function i_conv() which can be
> mapped and used in ILE versions of RPG and COBOL ?

i_conv() RULES.

I've wrappered it inside three calls:

CcsOpen(CD : Ccsid1 : Ccsid2)
CcsConvert(CD : Buffer)
CcsClose(CD)

CD is a 52 byte Conversion Descriptor and you can have as many as you
want (up to the limits of the API).  Ccsid1 and 2 are the source and
target CCSIDs (passed by value).  Buffer is a 510-byte varying buffer.
Conversion is done in place, with the buffer being lengthened or
shortened appropriately.

Works like a charm.  Obviously, you can blow things up if your buffer is
too big and you're converting from single byte to multiple byte, but in
general it works very, very well and is extremely fast.  Conversion in
place is of course a matter of application need, but it works extremely
well for my needs.  The neat thing is that, combined with my web
enabling tool, I can now run DBCS code on an SBCS machine.

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.