Retrieving translated messages (TRANMSG macro)

TRANMSG takes the application messages that you provide, and retrieves the corresponding translated messages from the system run-time message files. TRANMSG returns the translated message in a message text block (MTB).

If the requested language is not available, TRANMSG returns the message unchanged. To check the availability of specific languages, use the QRYLANG macro described in Determining which languages are available (QRYLANG macro).

In your application, call TRANMSG as close to the point of message presentation as possible to avoid presenting a translated version of the message to MVS™ functions (for example, installation exits, automation CLISTs, MCS consoles) that expect English text.

A message input/output block (MIO), mapped by CNLMMIO, serves as both input to and output from TRANMSG. You can either build the MIO yourself or have TRANMSG do it for you. If you do not supply a formatted MIO, TRANMSG constructs one by using the information you supply through the macro parameters. Build the MIO yourself if you are translating multi-line messages that have continuation lines. You will need to set the MIOCONT flag in the MIO.

If you build the MIO yourself, the MIO must contain the following when you issue TRANMSG:

For a mapping of the MIO, see z/OS MVS Data Areas in the z/OS Internet library.

The application's input messages can be in one of the following forms:

When TRANMSG completes, the MIO contains the address of the translated message in the output buffer. The translated message is in the form of an MTB.

Translating a multi-line message is a little different from translating a single-line message. You must take one of the following steps in preparing the multi-line message for translation:
Figure 1 shows how an application program uses the TRANMSG macro.
Figure 1. Using the TRANMSG Macro
ieaa6ms3