How do I display or capture the Natural system error message?
For example:
If my natural program abends, I can display the program it abended in (*program) and the error code (*error-nr) and also the line number (*error-line). How do I display the error message that corresponds to the *error-nr?
I am using ON-ERROR in my program and would like to display the error message along with the program, line number and error number.
Hi,
I think you can use the SYSERR file to display the error message. To execute the SYSERR file you can view the Natural external Routine USR0020N. Just provide the message type (NS/NL) and the error number.
Unfortunately our DBA is unwilling to give us access to any USR* program and even SYSERR isnt loaded as when i choose option DI it says no short descriptions loaded.
I guess I will have to settle to just displaying the error number and let the user or other programmers figure out what the actual error message is.