[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 2


errmsg Command

Purpose

Adds a message to the error log message catalog.

Syntax

errmsg-c ] [  -z FileName ] [  -w Set_List File ]

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:

* 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


-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:

all
Displays all message sets

D
Displays Detailed Data ID message set

E
Displays Error Description message set

F
Displays Failure Cause message set

I
Displays Install Cause message set

P
Displays Probable Cause message set

R
Displays Recommended Action message set

U
Displays User Cause message set
-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

  1. 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
    
  2. 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


/usr/lib/nls/msg/$LANG/codepoint.cat Contains the error log message catalog. In the United States, the value of $LANG is En_US.

Related Information

The errclear command, errdead command, errinstall command, errlogger command, errpt command, errstop command, errupdate command.

The errdemon daemon.

The errsave kernel service.

The errlog subroutine.

The error logging special files.

Error Logging Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]