System/360 and successor systems perform input/output using a special program for an
I/O channel, a processor dedicated to control peripheral storage device access and data transfer to and from main memory.
Channel programs are composed of
channel command words (CCWs). Programming those is a complex task requiring detailed knowledge of the hardware characteristics. Channel programs are initiated by a
START IO instruction issued by the operating system. This is usually front ended by the
Execute Channel Program (
EXCP) macro for application programmer convenience.
EXCP issues an SVC (
supervisor call instruction) that directs the operating system to issue the START IO on the application's behalf. Access methods provide: • Ease of programming - programmer would no longer deal with a specific device procedures, including error detection and recovery tactics in each and every program. A program designed to process a sequence of 80-character records would work no matter where the data are stored. • Ease of hardware replacement - programmer would no longer alter a program when data should be migrated to newer model of storage device, provided it supports the same access methods. • Ease shared data set access - an access method is a trusted program, that allows multiple programs to access the same file, while ensuring the basic data integrity and system security. • Read-ahead - Queued access methods may start as many I/O operations as there are
buffers available, anticipating application program requirements. Unlike systems derived from
Unix, where all files and devices are considered to be an unformatted stream of
bytes, mainframes offer a variety of data options and formats, such as varying types and sizes of
records, and different ways of accessing data, such as via record keys. Access methods provide programs a way of dealing with this complexity. • Programs can read or write a record or block of data and wait until the input/output operation is complete (
queued access methods) or allow the operation to be started and the program to continue to run, waiting for the completion at a later time (
basic access methods). • Programs can specify the size and number of buffers for a file. The same buffer or pool can be used for multiple files, allowing blocks of data to be read from one file and written to another without requiring data movement in memory. • Programs can specify the type of error recovery to be used in case of input/output errors. == Storage access methods ==