×
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.
On 5/14/07, Ruthirapathi, Arulanandham
<Arulanandham.Ruthirapathi@xxxxxxxxxxxxxxx> wrote:
How do I get EBCDIC and ASCII value of a character?
Please provide me a code snippet.
calling QDCXLATE is the simplest way. If you need to convert from one
ccsid to another you would use the iconv family of unix apis.
-Steve
** ---------------------- Qdcxlate ----------------------
** Qdcxlate - convert data using translation table
dQdcxlate pr extpgm('QDCXLATE')
d InDataLx 5p 0 const
d IoData 32767a options(*VarSize)
d InXltTbl 10a const
** ------------------- fDataToAscii ----------------------
pfDataToAscii b export
dfDataToAscii pi
d IoData 32767a options(*VarSize)
d InDataLx 10i 0 value
/free
Qdcxlate( InDataLx: IoData: 'QASCII' ) ;
/end-free
p e
** ------------------- fDataToEbcdic ---------------------
pfDataToEbcdic b export
dfDataToEbcdic pi
d IoData 32767a options(*VarSize)
d InDataLx 10i 0 value
/free
Qdcxlate( InDataLx: IoData: 'QEBCDIC' ) ;
/end-free
p e
As an Amazon Associate we earn from qualifying purchases.