×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Mihael,

Have you read the documentation for QDCXLATE? It says 'This API is
available for compatibility purposes or user-defined mappings only. Do not
use this API in new development; instead, use the iconv()--Code Conversion
API or the Convert a Graphic Character String (CDRCVRT) API.'

I suspect that QASCII is for CCSID 37 and that you are using a different
(German) CCSID. So it's probably better to switch to iconv, where you can
specify from and to CCSID.

Joep Beckeringh




From:
"Schmidt, Mihael" <Mihael.Schmidt@xxxxxxxxxxx>
To:
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Date:
16-02-2009 09:24
Subject:
QDCXLATE not working as expected



Hi,

i tried to convert some EBCDIC data to ASCII. I tried to use QDCXLATE and
the code looks like this:


D translate PR extpgm('QDCXLATE')
D length 5P 0 const
D data 32766A options(*varsize)
D table 10A const


D string S 100A

/free
string = '{ "Test" : true }';

translate(%size(string) : string : 'QASCII');

*inlr = *on;
return;
/end-free


I would have expected to see something like this in hex:
7B202254 65737422 203A2074 72756520 7D202020

But i got this in hex:
A2202254 65737422 203A2074 72756520 F0202020

The starting and ending curly braces are not correctly translated to
ASCII.
{ = 7B and not A2
} = 7D and not F0

Am I doing something wrong?

Thanx in advance

Mihael Schmidt
Anwendungsentwicklung

Dirk Rossmann GmbH
Iserhägener Str.16
30938 Burgwedel
* +49 (05139) 898 - 4353

Handelsregister-Nr. HRB 120546, Amtsgericht Hannover
Ust-Id-Nr. DE 115055186
St.-Nr. 16 / 205 / 65401
Geschäftsführer: Dirk Roßmann, Alice Schardt-Roßmann, Roland Frobel, Klaus
Praus


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

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