Start Input/Output

In MVS/370 and successor versions of IBM mainframe operating systems, Start Input/Output (STARTIO) is a macro instruction and a "branch entry" for low-level device access, where the programmer is responsible for providing a list of device-specific CCWs, that is, a channel program, to be executed by I/O channels, control units and devices and a number of "exits", several of which may be immediate returns to the Input/Output Supervisor (IOS). Invokers of STARTIO must be in supervisor mode and key 0. STARTIO interfaces directly with the IOS component of MVS.

Differences from Execute Channel Program (EXCP)
Start Input/Output differs from EXCP (including XDAP, which is simply a DASD-only subset of EXCP) and EXCPVR in the following fundamental way: Start Input/Output is a low level facility that supports, e.g., selection of channel paths, selection of exposures while Execute Channel Program is a high level facility that supports, e.g., CCW translation, page fixing, serialization of related requests, VIO.

Callers of Execute Channel Program must be in TCB mode. While IBM documents EXCPVR as being privileged, some unprivileged access method code uses it for SAM-E processing of DASD data sets. Except for some special cases, an application may only use Execute Channel Program for a Data Control Block (DCB) that it has OPENed (that is, it has been made accessible to the application by the system's OPEN/CLOSE/END-OF-VOLUME supervisor services, SVCs 19, 20 and 55, respectively).

Callers of STARTIO must be privileged, must page fix all storage areas related to the request and must use global storage for the SRB/IOSB. They may refer to any device that has a real UCB, even if that device is not allocated to an address space, that is, the device need not be OPENed.

Initiation and Completion Sequences
STARTIO's initiation sequence, usually referred to as its "front end", may be in TCB mode or in SRB mode. STARTIO's termination sequence, usually referred to as its "back end", is always in SRB mode.

STARTIO always utilizes an SRB/IOSB pair. The SRB (Service Request Block) is utilized to schedule processor activity, as required, on any available processor, in connection with the related I/O request, as the I/O request is not necessarily run by the processor in which the caller is running (indeed, in most cases it will not be). The IOSB (Input/Output Supervisor Block) describes the related I/O request, and passes parameters to and receives responses from IOS. IOS generally calls appendages in enabled SRB mode, but in special cases calls an appendage as a Disabled Interrupt Exit (DIE).

Device dependent processing
The Unit Control Block (UCB) for each device points to a Device Descriptor Table (DDT), which identified routines needed for device dependent processing, e.g., handling of Attention interrupts, appending of RESERVE CCWs, appending of Set File Mask and Seek.

De facto Support, versus non-Support
Although use of STARTIO by customers is not supported by IBM, nevertheless its macro instruction and its associated "branch entry" have remained remarkably stable throughout the forty-year-long (as of 2014) transition from MVS/370 to z/OS, as STARTIO is the sole method of performing lowest-level physical I/O operations on channel-attached devices on MVS/370 and subsequent instances of the OS. In particular, VSAM and VTAM use STARTIO, as, of course, do EXCP, XDAP and EXCPVR, and certain instances of IMS/VS and JES, most particularly where Channel-to-Channel operations are involved.

Changes from MVS/370 and Successors to ES/390 and z/OS
An additional "branch entry" was added in ES/390, which performs essentially the same function as the original, which was retained for compatibility with existing programs. This additional "branch entry" implicitly obtains the address of the related TCB (from PSATOLD), rather than explicitly obtaining it (from the TCB= keyword parameter) as the original "branch entry" did.

Error Recovery
Should a catastrophic error occur during IOS's processing of the related I/O request, it is this TCB, usually the caller's "job step" TCB, which will be abnormally terminated, not whichever TCB happened to be active when the error was detected, which, by the basic design of IOS, which is run asynchronously to all tasks and all address spaces, could be any TCB in any address space, or, indeed, no TCB at all, e.g., an SRB, or, perhaps more likely, the System Wait Task (which runs in the OS Master Scheduler's address space).

Documentation
Perhaps the best description of STARTIO and its application is a "white paper" entitled "The [ Start Input/Output Interface ] of MVS", written by Peter Haas, then with Amdahl Corp (subsequently liquidated). Haas's "white paper" contained an application program example which illustrated the required and optional parameters and exits employed by the STARTIO interface. A more detailed description of EXCP[VR] and STARTIO is available in the logic manual.