and an interruption condition is generated. Whether
a block at the device is advanced when no data is
transferred depends on the type of device and is
specified in the SL or SRL publication for the de­
vice.
When command chaining takes place, the sub­
channel appears to be in the working state from the
time the first operation is initiated until the device
signals the channel-end condition of the last opera­
tion of the chain. On the selector channel, the device
executing the operation stays connected to the chan­
nel and the whole channel appears to be in the work­
ing state for the duration of the execution of the
chain of operations. On the multiplexer channel an
operation in the burst mode causes the channel to
appear to be in the Working state only for the dura­
tion of the transfer of the burst of data. If channel
end and device end do not occur concurrently, the
device disconnects from the channel after providing
channel end, and the channel can in the meantime
communilcate with other devices on the interface.
Any unusual conditions cause command chaining
to be suppressed and an interruption condition to be
generated. The unusual conditions can be detected
by either the channel or the device, and the device
can provide the indications with channel end,
control-unit end, or device end. When the channel is
aware of the unusual condition by the time the
channel-end signal for the operation is received, the
chain is ended as if the operation during which the
condition occurred were the last operation of the
chain. The device-end signal subsequently is pro­
cessed as an interruption condition. When the device
signals unit check or unit exception with control-unit
end or device end, the subchannel terminates the
working state upon receipt of the signal from the
device. The channel-end indication in this case is not
made available to the program.
Termination by HALT I/O or HALT DEVICE
The instructions HALT I/O and HALT DEVICE
cause the current operation at the addressed channel
or subchannel to be immediately terminated. The
method of termination differs from that used upon
exhaustion of count or upon detection of program­
ming errors to the extent that termination by HALT I/O or HALT DEVICE is not necessarily contingent
on the receipt of a service request from the device.
When HALT I/O is issued to a channel operating
in the burst mode, the channel issues the halt signal
to the device operating with the channel, regardless
of either the current activity in the channel and on
the interface or the address of the device. If the
channel is involved in the data-transfer portion of an operation, data transfer is immediately terminated,
224 System/370 Principles of Operation and the device is disconnected from the channel. If
HALT I/O is addressed to a selector channel execu­
ting a chain of operations and the device has already
provided channel end for the current operation, the
instruction causes the device to be disconnected and
command chaining to be immediately suppressed.
When HALT DEVICE is issued to a channel
operating in burst mode, the halt signal is issued to
the device involved in the burst-mode operation only
if that device is the one to which the HALT DE­
VICE is addressed. If the operation thus terminated
is in the data-transfer portion of the operation, data
transfer is immediately terminated and the device is
disconnected from the channel. If the terminated
burst involves a selector channel executing a chain of
operations and the device has already provided
channel end for the current operation, HALT DE­
VICE causes the device to be disconnected and
command chaining to be immediately suppressed. If,
on a selector channel, the device involved in the
burst is not the one to which the HALT DEVICE is
addressed, no action is taken. If, on a multiplexer
channel, the device involved in the burst is not the
one to which the HALT DEVICE is addressed,
HALT DEVICE causes any operation for the ad­
dressed device to be terminated at the addressed
sub channel by suppressing any further data transfer
or command chaining for that device.
When HALT I/O or HALT DEVICE is issued to
a channel not operating in the burst mode, the ad­
dressed device is selected, and the halt signal is is­
sued as the device responds. On a multiplexer chan­
nel, command chaining, if indicated in the sub chan­
nel, is immediately suppressed.
The termination of an operation by HALT I/O or
HALT DEVICE on the selector channel results in
up to four distinct interruption conditions. The first
one is generated by the channel upon execution of
the instruction and is not contingent on the receipt
of status from the device. The command address and
count in the associated CSW indicate how much
data has been transferred, and the channel-status
bits reflect the unusual conditions, if any, detected
during the operation. If HALT I/O or HALT DE­
VICE is issued before all data specified for the oper­
ation has been transferred, incorrect length is indi­
cated, subject to the control of the SLI flag in the
current CCW. The execution of HALT I/O or
HALT DEVICE itself is not reflected in CSW sta­
tus, and all status bits in a CSW due to this interrup­
tion condition can be zero. The channel is available
for the initiation of a new I/O operation as soon as
the interruption condition is cleared.
The second interruption condition on the selector
channel occurs when the control unit generates the
channel-end condition. The selector channel handles
this condition as any other interruption condition
from the device after the device has been discon­
nected from the channel, and provides zeros in the
protection key, command address, count, and chan­
nel status fields of the associated CSW. The
channei-end. condition is not made available to the
program when HALT I/O or HALT DEVICE is
issued to a channel executing a chain of operations
and the device has already provided channel end for
the current operation.
Finally, the third and fourth interruption condi­
tions occur when control unit end, if any, and device
end are generated. These conditions are handled as
for any other I/O operation.
The termination of an operation by HALT I/O or
HALT DEVICE on a multiplexer channel causes the
normal interruption conditions to be generated. If
the instruction is issued when the subchannel is in
the data-transfer portion of an operation, the stib­ channel remains in the working state until channel
end is signaled by the device, at which time the sub­
channel is placed in the interruption-pending state. If
HALT I/O or HALT DEVICE is issued after the
device has signaled channel end and the sub channel
is executing a chain of operations, the channel-end
condition is not made available to the program, and
the sub channel remains in the working state until the
next status byte from the device is received. Receipt
of a status byte subsequently places the sub channel
in the interruption-pending state.
The CSW associated with the interruption condi­
tion in the subchannel contains the status byte pro­
vided by the device and the channel, and indicates at
what point data transfer was terminated. If HALT I/O or HALT DEVICE is issued before all data
areas associated with the current operation have
been exhausted or filled, incorrect length is indicat­
ed, subject to the control of the SLI flag in the cur­
rent CCW. The interruption condition is processed
as for any other type of termination.
The termination of a burst operation by HALT I/O or HALT DEVICE on a block-multiplexer
channel may, depending on the model and the type
of subchannel, take place as for a selector channel or
may allow the subchannel to remain in the working
state until the device provides ending status.
Programming Note
The count field in the CSW associated with an oper­
ation terminated by HALT I/O or HALT DEVICE
is unpredictable.
Termination by CLEAR I/O The termination of an operation by CLEAR I/O causes the subchannel information pertaining to tbe
current operation, if any, with the addressed device
to be stored in the CSW and the subchannel to be.
set to the available state. Unless a channel check had
been detected prior to the execution of CLEAR I/O or occurs during the execution of CLEAR I/O, the
contents of the CSW indicate the point at which tpe channel program was terminated. The count field.
and the incorrect length indication are, however,
unpredictable.
When CLEAR I/O terminates an operation at. a
sub channel in the interruption-pending state, up to
three subsequent interruption conditions related to
the operation can occur. Since CLEAR I/O causes
the sub channel to be made available, these interrup­ tion conditions will result in only the unit-status por­
tion of the CSW being stored.
The first interruption condition arises on a selec­
tor channel when channel-end status is presented to
the channel. This occurs only when the interruption­
pending status of the channel and subchannel at the
execution of CLEAR I/O were due to the previous
execution of HALT I/O or HALT DEVICE.
The second and third interruption conditions arise
when control unit end, if any, and device end are
presented to the channel.
When CLEAR I/O terminates an operation at a
sub channel in the working state, up to four subse­
quent interruption conditions related to the opera­
tion can occur. For all of these conditions, only the
status portion of the CSW will be stored.
The first interruption condition arises on certain
channels when the terminated operation was in the
midst of data transfer. Since the device is not sig­
naled to terminate the operation during the execu­
tion of CLEAR I/O unless the channel is working
with the addressed device when the instruction is
received, the device may, subsequent to the CLEAR I/O, attempt to continue the data transfer. The
channel responds by signaling the device to termi­
nate data transfer. Depending on the channel, the
need to signal the device to terminate data transfer
may be ignored or may be considered an interface
control check which creates an interruption condi­
tion. Only channel status is stored in the CSW.
The second interruption condition occurs when
channel-end status is received from the device. The
third and fourth conditions occur when control unit
end, if any, and device end are presented to the
channel. In these three cases, only unit status is
stored in the CSW.
Input/Output Operations 225
Previous Page Next Page