Friday, January 30, 2015

CCSIDs a.k.a Code Pages in IBM PASE for i

It all started with iconv() function in iSeries PASE. I need to figure out how to convert strings back and forth between iSeries PASE and ILE programs. I didn't realize at first that there were TWO instead of one libiconv library installed on the iSeries I worked with. One from GNU and one from IBM (the original one). I had to specify the one I intend to use specifically in my Makefile.am as follows:

 pase_to_rpg_string_LDADD = /QOpenSys/QIBM/ProdData/OS400/PASE/lib/libiconv.a

Well, then it turned out, the code page "string" specified for ILE C didn't work out. I found out that the code page string should be as shown here. I'm puzzled as to where that guy found the code page string. Then, I finally found that it was AIX code page specification after all, as this link shows. I reproduce it below, just in case (and hopefully IBM doesn't mind ;).

Table 1. CICS Shortcodes, CCSIDs and code pages that TXSeries for Multiplatforms supports
CICS short code nameCCSIDAIX® and Windows code pageHP–UX code page nameSolaris code page nameDescription
3737IBM-037american_eIBM-037IBMLatin-1 EBCDIC
8859-1819ISO8859-1iso8859_18859Latin-1 ASCII (ISO)
819819ISO8859-1iso8859_18859Latin-1 ASCII (IBM/ISO)
850850IBM-850roman8IBM-850Latin-1 ASCII
437437IBM-437iso8859_1IBM-437Latin-1 (PC) ASCII
930930IBM-930cp930IBM-930Japanese EBCDIC
931931IBM-931japanese_eIBM-931Japanese EBCDIC
939939IBM-939cp939IBM-939Japanese EBCDIC
932932IBM-932sjisja_JP.pckJapanese ASCII
EUCJP954IBM-eucJPeucJPeucJPJapanese ASCII (ISO)
942942IBM-942IBM-942IBM-942Japanese ASCII
943943IBM-943IBM-943IBM-943Japanese ASCII
EUCKR970IBM-eucKReucKReucKRKorean ASCII (ISO)
934934IBM-934IMB-934IBM-934Korean ASCII
944944IBM-944IBM-944IBM-944Korean ASCII
949949IBM-949korean15IBM-949Korean ASCII
933933IBM-933korean_eIBM-933Korean EBCDIC
EUCTW964IBM-eucTWIBM-eucTWeucTWTraditional Chinese
938938IBM-938IBM-938IBM-938Traditional Chinese ASCII
948948IBM-948IBM-948IBM-948Traditional Chinese ASCII
937937IBM-937chinese-t_eIBM-937Traditional Chinese EBCDIC
BIG5950Zh_TW.big5big5zh_TW.BIG5Traditional Chinese BIG5
946946IBM-946IBM-946IBM-946Simplified Chinese ASCII
13811381IBM-1381hp15CNIBM-1381Simplified Chinese ASCII
935935IBM-935chinese-s_eIBM-935Simplified Chinese EBCDIC
EUCN1383IBM-eucCNchinese-s_eeucCNSimplified Chinese ASCII (ISO)
GB180305488GB18030gb18030GB18030Simplified Chinese GB18030
864864IBM-864arabic8IBM-864Arabic ASCII
8859-61089ISO8859-6iso8859_6ISO8859-6Arabic ASCII (ISO)
10891089ISO8859-6iso8859_6ISO8859-6Arabic ASCII (IBM/ISO)
420420IBM-420arabic_eIBM-420Arabic EBCDIC
855855IBM-855IBM-855IBM-855Cyrillic ASCII
866866IBM-866IBM-866IBM-866Cyrillic ASCII
8859-5915ISO8859-5iso8859_5ISO8859-5Cyrillic ASCII (ISO)
915915ISO8859-5iso8859_5ISO8859-5Cyrillic ASCII (IBM/ISO)
10251025IBM-1025IBM-1025IBM-1025Multilingual Cyrillic EBCDIC
869869IBM-869greek8IBM-869Greek ASCII
8859-7813ISO8859-7iso8859_7ISO8859-7Greek ASCII (ISO)
813813ISO8859-7iso8859_7ISO8859-7Greek ASCII (IBM/ISO)
875875IBM-875greek_eIBM-875Greek EBCDIC
856856IBM-856hebrew8IBM-856Hebrew ASCII
8859-8916ISO8859-8iso8859_8ISO8859-8Hebrew ASCII (ISO)
916916ISO8859-8iso8859_8ISO8859-8Hebrew ASCII (IBM/ISO)
424424IBM-424hebrew_eIBM-424Hebrew EBCDIC
273273IBM-273german_eIBM-273Austria, Germany EBCDIC
277277IBM-277danish_eIBM-277Denmark, Norway EBCDIC
278278IBM-278finnish_eIBM-278Finland, Sweden EBCDIC
280280IBM-280italian_eIBM-280Italy EBCDIC
284284IBM-284spanish_eIBM-284Spain, Latin Am.(Sp) EBCDIC
285285IBM-285english_eIBM-285UK EBCDIC
297297IBM-297french_eIBM-297France EBCDIC
500500IBM-500IBM-500IBM-500International latin-1 EBCDIC
871871IBM-871icelandic_eIBM-871Iceland EBCDIC
852852IBM-852IBM-852IBM-852Latin-2 ASCII
8859-2912ISO8859-2iso8859_2ISO8859-2Latin-2 ASCII (ISO)
912912ISO8859-2iso8859_2ISO8859-2Latin-2 ASCII (IBM/ISO)
870870IBM-870IBM-870IBM-870Latin-2 EBCDIC
857857IBM-857turkish8IBM-857Turkey ASCII
8859-9920ISO8859-9iso8859_9ISO8859-9Turkey ASCII (ISO)
920920ISO8859-9iso8859_9ISO8859-9Turkey ASCII (IBM/ISO)
10261026IBM-1026turkish_eIBM-1026Turkey EBCDIC
UTF-81208UTF-8 (only)UTF-8UTF-8Unicode file code set
UCS-21200UCS-2 (only)UCS-2UCS-2Unicode processing code set

So, next time, you code on iSeries PASE, use "IBM-037" (EBCDIC code page) and "ISO8859-1" (ASCII 8-bit) strings to convert back and forth.

I hope this post will somehow save somebody someday.


Post a Comment

No comments: