A message is a readable character string conveying information about some aspect of a program's state or activity to a human audience. Messages may be purely informational or they may be intended to be responded to (that is, be interactive). Prompts, error displays, warnings, logs, announcements and program responses are all various kinds of message.
DCE applications can simply use the standard output routines (such as printf( ), sprintf( ), and so on) for messaging. However, DCE provides two message interfaces that automatically and transparently take care of many of the special problems that distributed application messaging can give rise to. These interfaces are used by the DCE components themselves to implement their messaging.
Both of the DCE message facilities use XPG4 message catalog files (see the X/Open Portability Guide) to hold message text. The message catalogs are generated by a DCE utility (called sams) during the application development process, and must be installed in the correct platform-dependent location in order for the DCE messaging library routines to be able to find them (and, consequently, the messages) at runtime.
The main purpose of message catalogs is to allow programs' message text to be stored and organized (separately from the programs themselves) in a culture- or nationality-specific way. This enables programs to switch their I/O styles and contents to the form appropriate to the geographical location (locale) they are running in, simply by using the appropriate catalog. Thus, it is essential to compose catalogs in such a way that each one contains message text appropriate only to a single (same) locale.
Questions such as the proper use of locales, proper language style for messages, where catalogs should be installed, and so on, all fall under the broad topic of internationalization, and are not discussed in this topic. The other important aspect of internationalization, namely character and code set compatibility, is discussed in detail in Writing Internationalized RPC Applications.