ERRMSG

ERRMSG

Top  Previous  Next

 

The ERRMSG statement displays a Pick style message from the ERRMSG file.

 

 

Format

 

ERRMSG msg.id {, arg...}

 

where

 

msg.idevaluates to the id of a record in the ERRMSG file which holds the message to be displayed. If this id is numeric, it will be copied to @SYSTEM.RETURN.CODE.

 

arg...is an optional comma separated list of arguments to be substituted into the message.

 

 

A standard Pick ERRMSG file is supplied with QM. Many of the messages in this file are irrelevant on QM. Users may modify this to add new messages or to change existing ones. QM only uses this file through ERRMSG and Pick style STOP or ABORT statements in user written programs.

 

The ERRMSG file entry consists of one or more fields, each prefixed by an action code. The message is built up and displayed by processing each code in turn. The codes are:

A{n}Display the next argument left aligned in a field of n characters. If n is omitted, the argument is displayed without any additional spaces.
BSound the terminal "bell".
DOutputs the system date in the form dd mmm yyyy.
EOutputs the msg.id enclosed in square brackets.
HtextOutputs the given text.
L{n}Outputs n newlines. The value of n defaults to 1 if omitted.
R{n}Display the next argument right aligned in a field of n characters. If n is omitted, the argument is displayed without any additional spaces.
SnDisplays n spaces.
TOutputs the system time in the form hh:mm:ss.

 

The component parts of the message are output with no insertion of newlines except as explicitly specified in the ERRMSG entry.

 

 

See also:

ABORT, STOP