The exit module is used to read source code from a user-supplied load module in place of SYSIN.
| Action by compiler | Resulting action by exit module |
|---|---|
| Loads the exit module (mod1) during initialization | |
| Calls the exit module with an OPEN operation code (op code) | Prepares its source for processing. Passes the status of the OPEN request back to the compiler. |
| Calls the exit module with a GET op code when a source statement is needed | Returns either the address and length of the next statement or the end-of-data indication (if no more source statements exist) |
| Calls the exit module with a CLOSE op code when the end-of-data is presented | Releases any resources that are related to its output |
The compiler uses a parameter list to communicate with the exit module. The parameter list consists of 10 fullwords containing addresses, and register 1 contains the address of the parameter list. The return code, data length, and data parameters are placed by the exit module for return to the compiler, and the other items are passed from the compiler to the exit module. The following table describes the contents of the parameter list.
| Offset | Contains address of | Description of item |
|---|---|---|
| 00 | User-exit type | Halfword identifying
which user exit is to perform the operation.
1=INEXIT |
| 04 | Operation code | Halfword indicating the
type of operation.
0=OPEN; 1=CLOSE; 2=GET |
| 08 | Return code | Fullword, placed by the
exit module, indicating the success of the requested operation.
0=Operation was successful; 4=End-of-data; 12=Operation failed |
| 12 | User-exit work area | Four-fullword work area provided by the compiler, for use by the user-exit module |
| 16 | Data length | Fullword, placed by the exit module, specifying the length of the record being returned by the GET operation (must be 80) |
| 20 | Data or str1 | Fullword, placed by the
exit module, containing the address of the record in a user-owned
buffer, for the GET operation.
str1 applies only to OPEN. The first halfword (on a halfword boundary) contains the length of the string, followed by the string. |
| 24 | Not used | (Used only by LIBEXIT) |
| 28 | Not used | (Used only by LIBEXIT) |
| 32 | Not used | (Used only by LIBEXIT) |
| 36 | Not used | (Used only by LIBEXIT) |
related references
Processing of LIBEXIT