IBM Books

Language Environment Interface Reference

dtw_cleanup()

Use the dtw_cleanup() interface function to cleanup the language environment if you use dtw_initialize() to initialize the language environment. Use this function for such tasks as disconnecting from a database or freeing variables. This interface function is optional.

While handling a Net.Data request, Net.Data calls a language environment's dtw_cleanup() interface function once when either Net.Data processing ends or an error stops Net.Data from processing the macro.

Net.Data sets the flags field in the dtw_lei_t structure to DTW_END_ABNORMAL if the cleanup processing is abnormal. The following abnormal conditions provide examples of when to use dtw_cleanup():

If a language environment's interface function sets the le_opaque_data field with a parameter to be passed between interface functions, use the dtw_cleanup() to free the field when processing ends.

This interface function does not affect message block processing. If the return value is non-zero, a default message is issued; if no default message exists, the macro processor issues a warning message.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]