Code page conversion for CICS Web support

When CICS® exchanges messages with a Web client or server, character data in the messages normally needs to undergo code page conversion on entering and leaving the CICS environment.

Code page conversion for text in messages is required for two reasons:
  • CICS and user-written applications for CICS typically use an EBCDIC encoding, but Web clients and servers typically use an ASCII encoding.
  • Within each encoding, a number of different code pages are used to support national languages.
Non-text content of messages, such as images or application data, does not require code page conversion.

In releases of CICS before CICS Transaction Server for z/OS®, Version 3 Release 1, code page conversion for CICS Web support was handled using a code page conversion table (DFHCNV). In CICS Transaction Server for z/OS, Version 5 Release 3, the code page conversion table is no longer required for CICS Web support, except in limited circumstances for upgrade purposes. CICS Web support handles code page conversion using z/OS conversion services.

In CICS Web support, the defaults for code page conversion of text are:
  • The default character set is the ASCII Latin-1 character set, ISO-8859-1. In HTTP messages, request or status lines and HTTP headers are typically in the US-ASCII character set, which is an older subset of ISO-8859-1. Message bodies containing text are often in ISO-8859-1.
  • The default EBCDIC code page, for data in the CICS environment, is specified by the LOCALCCSID system initialization parameter for the CICS region. The default for LOCALCCSID is the EBCDIC Latin character set, code page 037.
Sometimes a more suitable alternative code page can be identified:
  • A Web client or a server may specify a character set in the Content-Type header for a request or response, which is the character set that has been used for the message body.
  • A Web client may send an Accept-Charset header on a request, stating which character sets are acceptable for the response.
  • For non-HTTP requests and some older HTTP implementations, the character set used when transmitting the message might not be identified in the message headers, and you might need to identify this from your own knowledge of the message's source.
  • Application programmers need to identify a suitable code page in which their application can receive message data, if the default is not suitable.

CICS does not support all the character sets named by IANA. The IANA character sets supported by CICS for code page conversion are listed in HTML coded character sets.

In most circumstances, the media type for the message can determine whether or not code page conversion takes place. Request or response bodies with a non-text media type usually do not undergo code page conversion. An exception is made for compatibility with Web-aware applications coded in earlier releases; if the options used on a command indicate that the application was coded before CICS Transaction Server for z/OS, Version 3 Release 1, the media type does not influence code page conversion.

Depending on the type of message and the processing path, code page conversion information might be identified automatically by CICS, or specified in the URIMAP definition, or specified by an analyzer program, or specified in the commands issued by a Web-aware application program. Code page conversion for CICS as an HTTP server explains the process for CICS as an HTTP server, and Code page conversion for CICS as an HTTP client explains the process for CICS as an HTTP client.