Function codes and the flow of I/O exit processing

The I/O exit control block contains a function code field. This is set by Z Data Tools before the I/O exit is called. It indicates the type of I/O function being performed by Z Data Tools. The I/O exit is given the opportunity to perform actions at the points named by the function codes during Z Data Tools processing. The function codes are also discussed in Exit protocol. They are: Initialization, Termination, Open, Close, Read and Write.

Note that Z Data Tools makes the "real" I/O calls to the operating system. As a result, the I/O exit does not get control at exactly the time of the real I/O operation. Instead, the I/O exit gets control, as follows:
  • Open: After the "real" data set open
  • Close: Before the "real" close
  • Read: Immediately after a read from DASD (before Z Data Tools truncation or padding or other changes)
  • Write: Immediately before a write to DASD (after Z Data Tools truncation or padding or other changes)

The Function Code is the key input that your I/O exit should use to determine what actions to take. The following sections discuss the flow of control and data during I/O exit processing by focussing on the call type, as determined by the function code.