Skip to main content

This article explains how to use the TerminateProcess to stop a process with no cleanup.

Problem:

What can you do if an application needs to exit immediately with no cleanup in order to prevent some issues at process closedown in third party components?

Resolution:

You can use the TerminateProcess to stop a process with no cleanup. However this means that the COBOL runtime will not be able to perform any cleanup. If you issue TerminateProcess on a COBOL process then it could lead to issues such as corrupt files as normal clean up is not performed.

Note: This code should only be used with care. Attached is an example of this API being called from COBOL.

Incident Number: 2267166

Old KB# 14572

This article explains how to use the TerminateProcess to stop a process with no cleanup.

Problem:

What can you do if an application needs to exit immediately with no cleanup in order to prevent some issues at process closedown in third party components?

Resolution:

You can use the TerminateProcess to stop a process with no cleanup. However this means that the COBOL runtime will not be able to perform any cleanup. If you issue TerminateProcess on a COBOL process then it could lead to issues such as corrupt files as normal clean up is not performed.

Note: This code should only be used with care. Attached is an example of this API being called from COBOL.

Incident Number: 2267166

Old KB# 14572

where is the example?