The success or failure of a function call can be communicated through the implicit Net.Data macro variable, RETURN_CODE. This variable is set by Net.Data after returning from a call to the dtw_execute() interface. Its value is set to the return value of the dtw_execute() call itself. This value is then used by Net.Data to process the Net.Data macro MESSAGE block, if one was specified for this function call.
If you do not specify a MESSAGE block, or do not have an entry in a specified MESSAGE block to handle the return code from dtw_execute(), Net.Data displays the contents of the default_error_message field of the dtw_lei_t structure. This field can be set by the language environment at any time in the dtw_execute() routine. The setErrorMessage() routine in the program template, in Appendix B, Language Environment Template, shows an example of how to set the default_error_message field.