How to control the ASCII-to-EBCDIC conversion on an application that uses the CICS Transaction Gateway (CTG) to exchange data with a EBCDIC host.
 Technote (troubleshooting)
 
Problem(Abstract)
This technote describes the problem that one might see when one uses IBM® WebSphere® Studio Enterprise Developer or WebSphere Integrated Developer to generate a CICS® application that communicates with a CICS application on a host. With WebSphere Studio Enterprise Developer or WebSphere Integrated Developer, it is possible to generate application code that does this conversion. If the wrong code page is used, it can cause character conversion issues.
 
Cause
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
 
Resolving the problem
The way to handle this is to make the appropriate setting in the tooling to choose the code page that is needed. The default code page that is used id cp037. For more information on how to change the Host code page used in the generated CICS application, see 4.3.1 Host properties, in the IBM Redbooks®, Exploring WebSphere Studio Enterprise Developer V5.1.2.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java 2 Connectivity (J2C)
Operating system(s): Windows
Software version: 6.0.2
Software edition:
Reference #: 1270271
IBM Group: Software Group
Modified date: Sep 3, 2008