errmsg Command
Purpose
Adds a message to the error log message catalog.
Syntax
Description
The errmsg command updates and displays the error-log message catalog containing the Error Description, Probable Cause, User Cause, Install Cause, Failure Cause, Recommended Action, and Detailed Data ID message sets.
The message sets to which messages are to be added or deleted are listed in the input File parameter as follows:
Item | Description |
---|---|
* or $ | Comment lines must have an * (asterisk) or $ (dollar sign) comment operator in the first column. The * is the preferred choice. |
+ | Messages to be added must be preceded by a + (plus sign). |
- | Messages to be deleted must be preceded by a - (minus sign). |
SET | Message set ID. |
"Message Text" | Message text must be enclosed in double quotation marks. |
Message ID | Message ID of the message to be deleted. |
Messages added to the Error Description, Probable Cause, and Detailed Data ID message sets must not exceed 40 characters in length. Messages added to the User Cause, Install Cause, Failure Cause, and Recommended Action message sets must not exceed 128 characters in length. A maximum of 2047 user-defined messages can be added to each message set.
The errmsg command is used by application developers to create new messages used in the Error Record Templates Repository. An existing message should always be used, if possible.
If no flags are specified on the command line, the default operation is an update. Updates are specified in the input File parameter. If the input File parameter is not specified or if a - (minus sign) is specified instead of the File parameter, the errmsg command reads from standard input. For each message that is added, the errmsg command assigns an identifier. In addition to adding the message to the message catalog, the errmsg command writes the identifier and message text to the File.out file. The File.out file is also created when deletions are made from the message catalog. If the errmsg command is reading from standard input, the identifier and message text are written to standard output.
Flags
Item | Description |
---|---|
-c | Checks the input file for syntax errors. |
-w Set_List | Displays the error log message sets specified by the Set_List variables. This option displays the messages contained in the Error
Log message sets and their identifiers. Output is written to standard
output. The Set_List variables can be separated by commas or
enclosed in double-quotation marks and separated by commas or blanks.
The Set_List variables are the message set IDs or, if the value
of the Set_List variable all is specified, the contents
of all of the Error Log message sets are displayed. The valid values
of the Set_List variables are:
|
-z Filename | Uses the error-logging message catalog specified by the Filename variable. |
Security
Access Control: Only the root user can run this command.
Examples
- To delete messages from
the Probable Cause message set, enter:
errmsg * Delete messages FF1A, FF1B, and FF1C from the Probable Cause * message set SET P - FF1A - FF1B - FF1C
- To add a message to
the Probable Cause message set for the Widget Failure error, enter:
errmsg * Add a Probable Cause for Widget Failure SET P + "WIDGET ADAPTER"
File
Item | Description |
---|---|
/usr/lib/nls/msg/$LANG/codepoint.cat | Contains the error log message catalog. In the United States, the value of $LANG is En_US. |