Terminating the exit

For an HLL, there is little work to do. The code should ensure that all data sets are closed, all DD names are freed, and in general that all resources are released.

For an exit written in HLASM, free any additional storage that has been allocated.

The sample exit has two statements, PERFORM CLOSE-AND-FREE-DIRFILE and PERFORM CLOSE-AND-FREE-MEMFILE, that you may need to change to free your own resources.

Note: See also the discussion about initializing the exit, in Initializing the exit.