The OPTIONS TERMINATE SIGNAL defines a callback function in case of SIGTERM signal.
OPTIONS ON TERMINATE SIGNAL CALL function
The OPTIONS ON TERMINATE SIGNAL CALL function defines the function that must be called when the application receives the SIGTERM signal. With this option, you can control program termination. If this statement is not called, the program is stopped with an exit value of SIGTERM (15).
On Microsoft™ Windows™ platforms, the function will be called in the following cases:
Use the OPTIONS ON TERMINATE SIGNAL CALL function instruction with care, and do not execute complex code in the callback function. The code should only contain simple and short cleanup operations; Any interactive instruction must be avoided.