If ADEXIT is specified, the compiler loads the exit module (mod4) during initialization. The exit module is called for each record written to the SYSADATA file immediately after the record has been written to the file.
The compiler invokes the module using the OPEN operation code (op code). The module can then prepare for processing and pass the status of the OPEN request back to the compiler. Subsequently, each time the compiler has a SYSADATA record to write, the exit module is invoked with the PUT op code. The compiler supplies the address and length of the SYSADATA record, and the exit module returns the status of the PUT request to the compiler by a return code.
Before the compilation completes, the compiler invokes the exit module with the CLOSE op code so that the module can release any resources.
The compiler uses a structure, passed by reference, to communicate with the exit module.
related references
ADATA
Parameter list for exit modules