Following the header section of the input message file are zero or more message definitions. Each message definition begins with one or more of the following keywords.
MessageId={|{NUMBER}|+{NUMBER}}
Severity={SEVERITY_NAME}
Facility={FACILITY_NAME}
SymbolicName={NAME}
The MessageId keyword is required to mark the beginning of the message definition, although its value is optional. If no value is specified, then the value used will be the last value used for the facility, plus one. If the value is specified as + {NUMBER}, then the value used will be the last value used for the facility plus the number after the plus sign. Otherwise, if a numeric value is given, then that value will be used. Any MessageId value that does not fit in 16 bits is an error.
Severity and Facility are optional keywords that can specify additional bits to OR into the final 32-bit message code. If either of these are not specified, they default to the value last specified for a message definition. The initial values of these prior to processing the first message definition is:
Severity=Success Facility=Application
The value associated with these keywords must match one of the names given to the FacilityNames and SeverityNames keywords. The SymbolicNames keyword allows the ISV to associate a C symbolic constant name with the final 32-bit message code that is a result of OR-in together the MessageId, Severity and Facility bits. The constant definition is output to the generated include file with the following format:
// message text
#define CONSTANT_SYMBOL_NAME ((MessageIdTypedef
0x12345678)
The comment before the definition is a copy of the message text for the first language specified in the message definition. The CONSTANT_SYMBOL_NAME is the value of the SymbolicName keyword. The MessageIdTypedef is the value of the MessageIdTypedef keyword. The MessageIdTypedef is not output if it is NULL (the default value).
The following comment appears in the header of each include file to explain the bit-fields in the 32-bit message:
// Values are 32 bit values, laid out as follows: // // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 // +---+-+-+----------------------+-------------------------------+ // |Sev|C|R| Facility | Code | // +---+-+-+----------------------+-------------------------------+ // // where // // Sev - is the severity code // // 00 - Success // 01 - Informational // 10 - Warning // 11 - Error // // C - is the Customer code flag // // R - is a reserved bit // // Facility - is the facility code // // Code - is the facility's status code // // // Define the facility codes // // Define the severity codes //
![]()
Message Compiler - An Overview
Message Compiler - Syntax
MKMSGF - Make Message File
Utility
MKMSGF - Syntax