VMMSG

Get the text of an OpenVMS system message

 

 

 

VSupported on OpenVMS
Note

VMMSG is deprecated; we recommend you use %SYN_SYSERRTXT instead.

xcall VMMSG([error_code], error_text)

Arguments

error_code

(optional) An expression whose value equals an OpenVMS system message code. (n)

error_text

The variable that will be loaded with the text associated with the desired error code. (a)

Discussion

The VMMSG subroutine obtains the text associated with a given OpenVMS error code. You will use it primarily within Synergy programs to display text after an OpenVMS system service (or a Synergy DBL routine that directly interfaces to system services) has returned an error status.

If you omit the error_code argument, Synergy DBL uses the status of the last non-Synergy DBL subroutine. This status is the one that would be obtained if you issued a call to the XSTAT subroutine.

The VMMSG subroutine returns the full error code expansion, including any facility, severity level, and identifier emissions that are currently set. Additionally, any FAO arguments that may exist within the text of the message are not expanded.

For a more detailed discussion of the structure of OpenVMS messages, refer to your OpenVMS manual.

See also

XSTAT routine

Examples

The example below uses the system screen library procedure to display text in a terminal-independent manner. If an error on the call to get screen library is detected, a branch to label1 is taken, and the text for the detected error is returned in errtext.

record
    message             ,a*,    "This is the message"
    row                 ,d2,    12
    column              ,d2,    8
    flags               ,d2,    15
    error               ,d1
proc
        .
        .
        .
    xcall scr$put_screen(message, %val(row), %val(column), %val(flags))
    xcall xstat(status, error, ,,,)
    if (error .eq. 0) then goto label1
        .
        .
        .
label1,
        .
        .
        .
    xcall vmmsg(, errtxt)
        .
        .
        .