SYS(2018) - Error Message Parameter
Returns the error message parameter for the most recent error message.
For certain error messages, SYS(2018) returns information about the cause of the most recent error, such as the names of variables and files, which are called error message parameters. These error messages generally have placeholder in the error message, for example, "Class file "name" is invalid." Therefore, if you reference a file name that does not exist, the name of the variable is included in the error message.
SYS(2018)
Return Value
Character. SYS(2018) returns the error message parameter.
Example
Suppose you try to run a program named REPORTS, but the program doesn't exist and the error message "File REPORTS does not exist." appears. SYS(2018) returns the word "REPORTS" The word "REPORTS" is the error message parameter.
? SYS(2018)