Creating a message module table
Language Environment locates the user-created messages using a message module table that you code in assembler.
The message module table begins with a header that indicates the number of languages in the table. In Figure 1, for example, only English is used, so the first fullword of the header declares the constant F'1'.
TITLE 'UXMPMSGT'
UXMPMSGT CSECT
DC F'1' number of languages
DC CL8'ENU ' language identifier
DC A(TABLEENU) pointer to first language table
TABLEENU DC F'01' lowest message number in module
DC F'100' highest message number in module
DC CL8'EXMPLASM' message module name
DC F'-1' flags indicating the last...
DC F'-1' 16-byte entry (a dummy entry)...
DC CL8'DUMMY' in the language table
END UXMPMSGT
In the message module table in Figure 2, however, English and Japanese are used, so the first fullword of the header declares the constant F'2'. Following the message module table header are tables for each language.
TITLE 'UZOGMSGT'
UZOGMSGT CSECT
DC F'2' number of languages
DC CL8'ENU ' first language identifier
DC A(TABLEENU) pointer to first language table
DC CL8'JPN ' second language identifier
DC A(TABLEJPN) pointer to second language table
TABLEENU DC F'01' lowest message number in first module
DC F'100' highest message number in first module
DC CL8'ZOGMSGE1' first message module name
DC F'101' lowest message number in second module
DC F'200' highest message number in second module
DC CL8'ZOGMSGE2' second message module name
⋮
DC F'-1' flags indicating the last...
DC F'-1' 16-byte entry (a dummy entry)...
DC CL8'DUMMY' in the language table
TABLEJPN DC F'01' lowest message number in first module
DC F'100' highest message number in first module
DC CL8'ZOGMSGJ1' first message module name
DC F'101' lowest message number in second module
DC F'200' highest message number in second module
DC CL8'ZOGMSGJ2' second message module name
⋮
DC F'-1' flags indicating the last...
DC F'-1' 16-byte entry (a dummy entry)...
DC CL8'DUMMY' in the language table
END UZOGMSGT
Each language table has one or more 16-byte entries that indicate the name of a load module and the range of message numbers the module contains. The first fullword of each 16-byte entry contains the lowest message number within the corresponding module; the second fullword contains the highest message number for that module. The last 8 bytes of each 16-byte entry contain the name of the message module to be loaded. For example, in Figure 2, Japanese messages numbered 101–200 are found in module ZOGMSGJ2. Finally, each language table ends with a dummy 16-byte entry whose first two fullwords contain the flag F'-1' indicating the end of the language table.
Use an 8-character format for the title of the message module table: ‘U’ (to indicate that the table contains user-created messages), followed by a 3-character facility ID, followed by ‘MSGT’. For example, the title of the message module table for messages using a facility ID of XMP would be ‘UXMPMSGT’ as shown in Figure 1; the title of the message module table for messages having a facility ID of ZOG would be ‘UZOGMSGT’ as shown in Figure 2.
After you create the message module table:
- Assemble it into a loadable TEXT file using High Level Assembler.
- Store the message module table in a library where it can be dynamically accessed while your routine is running.