state, or an equipment error detected during the
execution ofTEST I/O. The instruction TEST I/O cannot be used to clear a pending interruption condi
tion due t.o thePCI flag while the subchannel is in
the working state.
Input/{)utput Instruction Exception
Handling
Before the channel is signaled to execute anI/O instruction, the instruction is tested for validity by
theCPU. Exceptional conditions detected at this
time cause a program interruption. When the inter
ruption occurs, the currentPSW is stored as the pro
gram oldPSW and is replaced by the program new PSW. The interruption code in the old PSW identi
fies the cause of the interruption.
The following exception may cause a program
interruption:
Privileged Operation: AnI/O instruction is encoun
tered when theCPU is in the problem state. The
instruction is suppressed before the channel has been
signaled to execute it. TheCSW, the condition code
in thePSW, and the state of the addressed sub chan
nel andI/O device are not affected by the attempt
to execute anI/O instruction while in the problem
state.
Execution ofInput/Output Operations The channel can execute six commands: write,
read, read backward, control, sense, and transfer in
channel. Each command except transfer in channel
initiates a correspondingI/O operation. The term "I/O operation" refers to the activity initiated by a
command in theI/O device and associated subchan
nel. The subchannel is involved with the execution
of the operation from the initiation of the command
until the channel-end signal is received or, in the
case of command chaining, until the device-end sig
nal is received. The operation in the device lasts until
device end occurs.
Blocking of Data
Data recorded by anI/O device may be divided into
blocks. The length of a block depends on the device;
for example, a block can be a card, a line of printing,
or the information recorded between two consecu
tive gaps on magnetic tape.
The maximum amount of information that can be
transferred in oneI/O operation is one block. An I/O operation is terminated when the associated
main storage area is exhausted or the end of the
block is reached, whichever occurs first. For some
operations, such as writing on a magnetic tape unit210 Syste:m/370 Principles of Operation or at an inquiry station, blocks are not defined, and
the amount of information transferred is controlled
only by the program.
Channel Address Word
The channel address word ( CAW) specifies the stor
age protection key and the address of the first CCW
associated withST ART I/O or START I/O FAST RELEASE. The channel refers to the CAW only
during the execution ofSTART I/O or START I/O FAST RELEASE. The CAW is fetched from real
location 72 of theCPU issuing the instruction. The
pertinent information thereafter is stored in the sub
channel, and the program is free to change the con
tents of the CAW. Fetching of the CAW by the
channel does not affect the contents of the location.
The CAW has the following format:I Key CCW Address
o 4 8
The fields in the CAW are allocated for the fol
lowing purposes:
31
Protection Key: Bits0-3 form the protection key for
all commands associated withST ART I/O and ST ART I/O FAST RELEASE. This key is matched
with a key in storage whenever a reference is made
to main storage during anI/O operation.
CCWAddress: Bits 8-31 designate the location of
the first CCW in absolute main storage.
Bit positions 4-7 of the CAW must contain zeros.
The three low-order bits of the command address
must bc zeros to specify the CCW on integral
boundaries for doublewords. If any of these restric
tions is violated or if the CCW address specifies a
location protected against fetching or outside the
main storage of the particular installation,ST ART
II0 and ST ART I/O FAST RELEASE cause the
status portion of theCSW to be stored with the pro
tection check or program-check bit on. In this event,
theI/O operation is not initiated.
Programming Note
Bit positions 4-7 of the CAW, which presently must
contain zeros, may in the future be assigned for the
control of new functions. It is therefore recommend
ed that these bit positions not be set to one for the
purpose of obtaining an intentional program-check
indication.
execution of
tion due t.o the
the working state.
Input/{)utput Instruction Exception
Handling
Before the channel is signaled to execute an
the
time cause a program interruption. When the inter
ruption occurs, the current
gram old
fies the cause of the interruption.
The following exception may cause a program
interruption:
Privileged Operation: An
tered when the
instruction is suppressed before the channel has been
signaled to execute it. The
in the
nel and
to execute an
state.
Execution of
read, read backward, control, sense, and transfer in
channel. Each command except transfer in channel
initiates a corresponding
command in the
nel. The subchannel is involved with the execution
of the operation from the initiation of the command
until the channel-end signal is received or, in the
case of command chaining, until the device-end sig
nal is received. The operation in the device lasts until
device end occurs.
Blocking of Data
Data recorded by an
blocks. The length of a block depends on the device;
for example, a block can be a card, a line of printing,
or the information recorded between two consecu
tive gaps on magnetic tape.
The maximum amount of information that can be
transferred in one
main storage area is exhausted or the end of the
block is reached, whichever occurs first. For some
operations, such as writing on a magnetic tape unit
the amount of information transferred is controlled
only by the program.
Channel Address Word
The channel address word ( CAW) specifies the stor
age protection key and the address of the first CCW
associated with
during the execution of
location 72 of the
pertinent information thereafter is stored in the sub
channel, and the program is free to change the con
tents of the CAW. Fetching of the CAW by the
channel does not affect the contents of the location.
The CAW has the following format:
o 4 8
The fields in the CAW are allocated for the fol
lowing purposes:
31
Protection Key: Bits
all commands associated with
with a key in storage whenever a reference is made
to main storage during an
CCW
the first CCW in absolute main storage.
Bit positions 4-7 of the CAW must contain zeros.
The three low-order bits of the command address
must bc zeros to specify the CCW on integral
boundaries for doublewords. If any of these restric
tions is violated or if the CCW address specifies a
location protected against fetching or outside the
main storage of the particular installation,
II
status portion of the
tection check or program-check bit on. In this event,
the
Programming Note
Bit positions 4-7 of the CAW, which presently must
contain zeros, may in the future be assigned for the
control of new functions. It is therefore recommend
ed that these bit positions not be set to one for the
purpose of obtaining an intentional program-check
indication.