Some operating systems, such as the IBM z/OS® operating
system, are EBCDIC based. Data sent to applications, like IBM CICS, has to
be converted from ASCII to EBCDIC. But there is more than one EBCDIC code
page on the IBM host. It is necessary to use the correct code page to do
the conversion. If this is not done, it can lead to data conversion
problems.
WebSphere Studio Enterprise Developer or WebSphere Integrated Developer
provide application code generators that generate code to communicate with
CICS on the host and which use the CICS Transaction Gateway (CTG). CICS
applications use a commarea to exchange data. If the CICS server is on an
IBM host, the commarea must be converted from ASCII to EBCDIC. The
conversion is controlled by the code page used to do the conversion. The
conversion itself is made in classes generated by WebSphere Studio
Enterprise Developer or WebSphere Integrated Developer tooling. When the
code is generated, there is an option to change the code page used. By
default, EBCDIC code page cp037 is used.
For example, say the following data is sent from a browser running a
servlet, "[]!^|"; in ASCII, these are the hexadecimal codes, 0x5b 0x5d
0x21 0x5e 0x7c. If the generated CICS application converts these using
EBCDIC code page cp037, these are converted to 0xba 0xbb 0x5a 0xb0 0x4f.
If, however, EBCDIC code page cp500, these are converted to 0x4a 0x51 0x4f
0x5f 0xbc.
Text |
ASCII |
EBCDIC cp037 |
EBCDIC cp500 |
[]!^| |
0x5b 0x5d 0x21 0x5e 0x7c |
0xba 0xbb 0x5a 0xb0 0x4f |
0x4a 0x51 0x4f 0x5f 0xbc |
|