You need to determine if the language in which you want to issue
messages is available to MMS. The message query function (QRYLANG)
allows you to verify that the language you want is active, and also
to receive a list of all available languages.
QRYLANG returns the information you request in the language query block
(LQB), mapped by CNLMLQB. This block contains the following:
- The standard 3-character code for the language
- The name of the language
- A flag indicating whether the language contains double-byte characters
If you ask for a list of all available languages, QRYLANG returns
an LQB with one language entry for each language.
You need to define storage for an LQB before issuing QRYLANG.
To determine how much storage you need for the LQB if you want a list
of all active languages:
- Calculate the length of the header section in mapping macro CNLMLQB.
- Determine the total number of languages by looking in the MCAALCNT
(active language count) field of the MCA, mapped by CNLMMCA. Your
program must be in 31-bit addressing mode to reference the MCA.
- Multiply the total number of languages you intend to query by
the LQBEBL (the length of one entry). This will give you the length
of the LQB substitution data area.
- Add the length of the LQB substitution data area to the length
of the header.
To determine how much storage you need for the LQB if you want
to query one language:
- Calculate the length of the header section in mapping macro CNLMLQB.
- Add the length of the LQB substitution data area to the length
of the header.