CBL_CCSID_FROM_IANA

Converts the given IANA registered name or decimal CCSID string into an equivalent IBM CCSID.

Syntax:

call "CBL_CCSID_FROM_IANA" using by reference iana
                                              ccsid

Parameters:

  Using call prototype (see Key) Picture
iana pic x(n) pic x(n)
ccsid cblt-x4-comp5 pic x(4) comp-5

On Entry:

iana
The IANA name whose CCSID is required, or the decimal digits representing a CCSID number. This data must be in ASCII, and either null- or space-terminated.

On Exit:

ccsid
The binary CCSID equivalent of the IANA or decimal CCSID representation.
return-code
Indicates whether the routine was successful:
0 Success
1 Conversion map files not installed
2 Target buffer is too small for conversion
3 Invalid maps files installed for conversion
4 Out of memory
5 Internal error
6 Unable to open map file
7 Unable to read map file
8 Invalid source data for conversion
9 Too many installed map files for conversion
10 IANA name not found
11 COBDIR is an invalid directory name
12 Flags invalid for conversion

Comments:

The COBOL Runtime System uses the following table when converting to a CCSID value:

IANA CCSID
37 IBM037
273 IBM273
277 IBM277
278 IBM278
280 IBM280
284 IBM284
285 IBM285
297 IBM297
367 US-ASCII
420 IBM420
423 IBM423
424 IBM424
437 IBM437
500 IBM500
808 IBM808
813 ISO-8859-7
819 ISO-8859-1
838 IBM-Thai
850 IBM850
852 IBM852
855 IBM855
857 IBM857
858 IBM00858
862 IBM862
863 IBM863
864 IBM864
866 IBM866
867 IBM867
869 IBM869
870 IBM870
871 IBM871
872 IBM872
874 TIS-620
878 KOI8-R
901 ISO-8859-13
902 IBM902
904 IBM904
912 ISO-8859-2
915 ISO-8859-5
916 ISO-8859-8-I
920 ISO-8859-9
921 IBM921
922 IBM922
923 ISO-8859-15
924 IBM00924
932 Shift_JIS
943 Windows-31J
949 EUC-KR
950 Big5
954 EUC-JP
964 EUC-TW
970 EUC-KR
1004 Microsoft-Publish
1026 IBM1026
1043 IBM1043
1047 IBM1047
1051 hp-roman8
1089 ISO-8859-6
1129 VISCII
1140 IBM01140
1141 IBM01141
1142 IBM01142
1143 IBM01143
1144 IBM01144
1145 IBM01145
1146 IBM01146
1147 IBM01147
1148 IBM01148
1149 IBM01149
1153 IBM01153
1155 IBM01155
1160 IBM-Thai
1161 TIS-620
1162 TIS-620
1163 VISCII
1168 KOI8-U
1200 UTF-16BE
1202 UTF-16LE
1204 UTF-16
1208 UTF-8
1232 UTF-32BE
1234 UTF-32LE
1236 UTF-32
1250 windows-1250
1251 windows-1251
1252 windows-1252
1253 windows-1253
1254 windows-1254
1255 windows-1255
1256 windows-1256
1257 windows-1257
1258 windows-1258
1275 MACINTOSH
1363 KSC_5601
1370 Big5
1381 GB2312
1383 GB2312
1386 GBK
1392 GB18030
4909 ISO-8859-7
5039 Shift_JIS
5346 windows-1250
5347 windows-1251
5348 windows-1252
5349 windows-1253
5350 windows-1254
5351 windows-1255
5352 windows-1256
5353 windows-1257
5354 windows-1258
5488 GB18030
8612 IBM420
8616 IBM424
9005 ISO-8859-7
12712 IBM424
13488 UTF-16BE
13490 UTF-16LE
16840 IBM420
17248 IBM864
17584 UTF-16BE
17586 UTF-16LE
62209 IBM862
62210 ISO-8859-8
62211 IBM424
62213 IBM862
62215 ISO-8859-8
62218 IBM864
62221 IBM862
62222 ISO-8859-8
62223 windows-1255
62224 IBM420
62225 IBM864
62227 ISO-8859-6
62228 windows-1256
62229 IBM424
62231 IBM862
62232 ISO-8859-8
62233 IBM420
62234 IBM420
62235 IBM424
62237 windows-1255
62238 ISO-8859-8-I
62239 windows-1255
62240 IBM424
62242 IBM862
62243 ISO-8859-8-I
62244 windows-1255
62245 IBM424
62250 IBM420