status portion, and the subchannel is immediately
made available to the program. The I/O operation,
however, is initiated, and, if channel end is not ac­
companied by device end, the device remains busy.
Device end, when subsequently provided by the
device, causes an interruption condition to be gener­
ated.
An immediate operation initiated by the first
CCW designated by the CAW during a START I/O FAST RELEASE executed independently of the
addressed device appears to the program as a non­
immediate command. That is, any status generated
by the device for the immediate command, or for a
subsequent command if command chaining occurs,
causes an interruption condition to be generated.
When command chaining is specified after an
immediate operation and no unusual conditions have
been detected during the execution, or when com­
mand retry occurs for an immediate operation, nei­
ther START I/O nor START I/O FAST RELEASE
causes the immediate storing of CSW status. The
subsequent commands in the chain are handled nor­
mally, and the channel-end condition for the last
operation generates an interruption condition even if
the device provides the signal immediately upon
receipt of the command code.
Whenever immediate completion of an I/O opera­
tion is signaled, no data has been transferred to or
from the device. The data address in the CCW is not
checked for validity.
Since a count of zero is not valid, any CCW spec­
ifying an immediate operation must contain a nonze­
ro count. When an immediate operation is executed,
however, incorrect length is not indicated to the
program, and command chaining is performed when
so specified.
Programming Note
Control operations for which the entire operation is
specified in the command code may be executed as
immediate operations. Whether the control function
is executed as an immediate operation depends on
the operation and type of device and is specified in
the SL or SRL publication for the device.
Conclusion of Data Transfer
When the device accepts a command, the subchannel
is set up for data transfer. The subchannel is said to
be working during this period. Unless the channel
detects equipment malfunctioning or the operation is
concluded by CLEAR 1/0, or, on the selector chan­
nel, the operation is concluded by CLEAR I/O,
HALT I/O, or HALT DEVICE, the working state
lasts until the channel receives the channel-end sig­
nal from the device. When no command chaining is
specified or when chaining is suppressed because of
unusual conditions, the channel-end condition causes
the operation at the subchannel to be terminated and
an interruption condition to be generated. The status
bits in the associated CSW indicate channel end and
the unusual conditions, if any. The device can signal
channel end at any time after initiation of the opera­
tion, and the signal may occur before any data has
been transferred.
For operations not involving data transfer, the
device normally controls the timing of the channel­
end condition. The duration of data transfer opera­
tions may be variable and may be controlled by the
device or the channel.
Excluding equipment errors, CLEAR I/O, HALT
DEVICE, and HALT I/O, the channel signals the
device to conclude data transfer whenever any of the
following conditions occurs:
The storage areas specified for the operation are
exhausted or filled.
Program-check condition is detected.
Protection-check condition is detected.
Chaining-check condition is detected.
The first of these conditions occurs when the
channel has stepped the count to zero in the last
CCW associated with the operation. A count of zero
indicates that the channel has transferred all infor­
mation specified by the program. The other three con­
ditions are due to errors and cause premature con­
cluding of data transfer. In either case, the conclud­
ing is signaled in response to a service request from
the device and causes data transfer to cease. If the
device has no blocks defined for the operation (such
as writing on magnetic tape), it concludes the opera­
tion and generates the channel-end condition.
The device can control the duration of an opera­
tion and the timing of channel end by blocking of
data. On certain operations for which blocks are
defined (such as reading on magnetic tape), the de­
vice does not provide the channel-end signal until
the end of the block is reached, regardless of wheth­
er or not the device has been previously signaled to
conclude data transfer.
Checking for the validity of the data address is
performed only as data is transferred to or from
main storage. When the initial data address in the
CCW is invalid, no data is transferred during the
operation, and the device is signaled to conclude the
operation in response to the first service request. On writing, devices such as magnetic tape units request
the first byte of data before any mechanical motion
is started and, if the initial data address is invalid, the
operation is concluded before the recording medium
has been advanced. However, since the operation
has been initiated, the device provides channel end,
Input/Output Operations 223
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
Previous Page Next Page