GDDM V3R2 Base Application Programming Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Implicit conversion of code pages by GDDM

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



If an installation needs to use your application to process some data files it has received from another country, it can get GDDM to perform the necessary code-page conversion by setting two particular GDDM external defaults. In the ADMMDFT macro the installation code page is usually set to the national CECP, using the INSCPG default. This ensures that data, such as a filename, passing between GDDM and the operating system is preserved intact when it contains national-use characters from a different code page. The APPCPG default specifies the application code page to be used for conversions when data passes between GDDM and the application. This is also usually set to the national CECP and can be specified in one or more of the following locations:

  • The ADMMDFT macro
  • The external-defaults module
    or
  • The user-defaults file (PROFILE ADMDEFS).
    
    
An APPCPG default specified in one of these files overrides any other values specified for it in the files above it in this list.

Whenever a device is opened, GDDM queries it to determine the device code page (although you can specify it explicitly also). With the query reply from the device as the device code page and the default setting for the application code page, GDDM can then perform the conversion implicitly.

Some devices do not return their code-page support information to GDDM when they are opened. Users of such devices can specify a device code-page for them by including the DEVCPG processing option on a NICKNAME statement for the device in their user-defaults file.

Even if a device does return code-page support information to GDDM, a device code page specified by the DEVCPG default overrides the query reply. If the device does not return the information, and no processing option has been specified, the installation code page is taken as the device code page.

In most cases, you don't need to specify any code pages in an application program. It is probably best, if you leave this to the users or installers of the application. This allows them to specify an application code page that best matches their input devices and the files in their data bases. However, there are some circumstances in which you may need to program code-page conversion into your program, see "Converting code pages using API calls in the program" in topic 12.11.4.

For detailed information on setting GDDM default statements, see the GDDM Base Application Programming Reference book.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012