GET_MSG_TYPE
Script function: Retrieves the type of a message number
Syntax
GET_MSG_TYPE (Message number)
Syntax |
Description/Format |
---|---|
Message number |
Number of a message whose type should be read |
Return codes |
---|
"A" - Abort |
There are different types of message numbers such as warnings and error messages.
Tip: Use the SYS_LAST_ERR_NR script function to retrieve the number of the last error message. For more information, see SYS_LAST_ERR_NR.
Example
The following example informs the administrator if an error or abort message is output:
:SET &ERRNR# = SYS_LAST_ERR_NR()
:SET &ERRTYP# = GET_MSG_TYPE(&ERRNR#)
:IF &ERRTYP# = "A" OR "E"
: SET &ERRINS# = SYS_LAST_ERR_INS()
: SET &MESSAGE# = GET_MSG_TXT(&ERRNR#,&ERRINS#)
: PRINT &MESSAGE#
: SET &RET# = SEND_MAIL("smith@automic.com",,"Processing error",&MESSAGE#)
:ENDIF
See also: