SYS(2018) - Error Message Parameter

Returns the error message parameter for the most recent error.

SYS(2018)

Return Values

Character

Remarks

Certain error messages return additional information about the cause of the error. For example, if you reference a variable that doesn't exist, the name of the variable is included in the error message. SYS(2018) returns this additional information, called the error message parameter. Names of variables and files are common types of error message parameters.

Suppose you try to run a program named REPORTS, but the program doesn't exist. The text of the error message displayed is:

File REPORTS does not exist.

REPORTS is the error message parameter, and it is returned by SYS(2018):

? SYS(2018)

See Also

ERROR( ) | MESSAGE( ) | ON ERROR | SYS( ) Functions Overview