Processing of INEXIT

Start of changeThe INEXIT exit module is used to read the primary source code instead of obtaining it directly from SYSIN.End of change

Table 1. INEXIT processing
Action by compiler 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

INEXIT parameters

The compiler uses 10 parameters, passed by reference, to communicate with the exit module. The return code, data length, and data parameters are set by the exit module for return to the compiler; the other items are passed from the compiler to the exit module.

Table 2. INEXIT parameters
Parameter number Parameter item Description of item
1 User-exit type Halfword that identifies which user exit is to perform the operation.

1=INEXIT

2 Operation code Halfword that indicates the type of operation:
  • 0=OPEN
  • 1=CLOSE
  • 2=GET
3 Return code Fullword, set by the exit module, that indicates the success of the requested operation:
  • 0=Operation was successful
  • 4=End-of-data
  • 12=Operation failed
4 User-exit work area Six-fullword work area provided by the compiler for use by the user-exit module.

First word: for use by INEXIT

5 Data length Fullword, set by the exit module, that specifies the length of the record being returned by the GET operation (must be 80)
6 Data or str1 Fullword, set by the exit module, that contains 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.

7 Not used (Used only by LIBEXIT and MSGEXIT)
8 Not used (Used only by LIBEXIT)
9 Not used (Used only by LIBEXIT)
10 Not used (Used only by LIBEXIT)