Examples of specifying CCSIDs for application data

If your applications handle international or Unicode data, you probably need to specify a different application CCSID than the default. Also, if you deploy applications to international locations, you probably need to bind different versions of the application with the appropriate CCSIDs.

Example of ENCODING(UNICODE) bind option: Assume that the package MY_PACK is bound with the option ENCODING(UNICODE). DB2® assumes that all character input and output host variables are encoded using CCSID 1208. DB2 assumes that all graphic input and output host variables are encoded using CCSID 1200.
Example of setting CCSIDs in a distributed environment: Assume that your DB2 for z/OS® subsystem is located in the United States and you have users around the world that connect to this subsystem. The following figure illustrates this scenario.
Figure 1. Example of setting CCSIDs in a distributed environment
Begin figure summary. This figure shows a DB2 server and terminal emulators with different CCSIDs. Detailed description available.

The users that use DRDA do not need to use the ENCODING bind option to handle CCSID conversions because DRDA handles all conversions. However, users might choose to specify the ENCODING bind option to influence internal DB2 processing.

The users that use 3270 terminal emulators need to set up their emulators to use a CCSID that corresponds to the country in which they reside. In this example, the CCSID of one of those terminal emulators is 285. You need to bind the plans or packages that this client uses with ENCODING(285). Likewise, for the terminal emulator that has CCSID 284, you need to bind the plans or packages that this client uses with ENCODING(284). Also, for the terminal emulator that has CCSID 273, you need to bind the plans or packages that this client uses with ENCODING(273).

Example of ensuring that remote users access the correct version of the SPUFI application according to their terminal CCSID: Suppose that you want to prevent users in the U.K. from using the U.S. version of SPUFI. Instead of granting the EXECUTE privilege for the SPUFI packages to public, restrict access to only those users in the U.S. Then, bind additional SPUFI packages with the ENCODING bind option that specifies the appropriate terminal CCSID for the U.K. (For instructions on how to find the terminal CCSID value in ISPF, TSO, or CICS®, see Finding the CCSID values of your data sources.) Authorize the U.K. users to use only this version of SPUFI.