× 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.



Hi Jim,
 
<snip>
I am looking for some coding examples for converting CCSID 13488 to CCSID
37. I am looking into using a password validation pgm that has to allow for
incoming parms in CCSID 13488.....Any help would be greatly appreciated.
TIA, Jim !
</snip>
 
When you say convert CCSID 13488 to CCSID 37 are you talking about
converting a byte stream within a RPG program? If so then you want to use
iconv.
 
To use iconv you create a conversion descriptor (in your case specifying
conversion between 13488 and 37). You then pass the conversion decriptor, a
couple of pointers, and a couple of ints to iconv(). Then iconv will
converts the data on the first pointer from the first CCSID to the second
CCSID, and places it on the second pointer. In your case you simply pass the
addresses and lengths of your program variables.
 
Also, the beauty of this approach is that you can pass a CCSID of 0 (zero)
when you create your conversion descriptor and it will default to the job
CCSID. This is useful for us in Europe where we have multiple production
machines, each using different CCSIDs. It means we can convert passed data
from a known CCSID to the job CCSID without needing to know the CCSID in use
within the job.
 
If you need code samples just shout (but I'm sure the archives are littered
with them).
 
Cheers
 
Larry Ducie

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.