$ZMessage()

Examples of $ZMESSAGE()

The $ZMESSAGE function returns a message string associated with a specified status code in the standard VMS error message format. The $ZMESSAGE function is analogous to the DCL F$MESSAGE lexical function.

The format for the $ZMESSAGE function is:

    $ZM[ESSAGE](intexpr)
    

$ZMESSAGE() provides a tool for examining the message associated with a particular message code as reported in $ZSTATUS.

The standard VMS error message format is:

    %FACILITY-S-IDENT, TEXT
    

Where:

% Identifies the first message issued for a given error. A hyphen (-) prefaces subsequent messages for the same error.

FACILITY Identifies the source of the error.

S Indicates one of five severity level indicators.

The indicators and their meanings are:

S Successful completion

I Information

W Warning

E Error

F Fatal or severe error

IDENT Represents an abbreviation of the message text.

TEXT Explains the message

The DCL command SET MESSAGE controls which message fields $ZMESSAGE() returns. By default, the VMS message facility returns all four fields.

The $ZSTATUS Intrinsic Special Variable holds the message code and the message of the last non-Direct Mode GT.M error. For more information on $ZSTATUS, refer "Intrinsic Special Variables".