vice end, the CSW contains the address of the
command to be retried + 8.
6. On a multiplexer channel, chained CCWs
which might ordinarily have been executed in a
burst, may, upon the occurrence of command
retry, cause multiplexing to occur, with the re­
sult that the channel becomes unexpectedly
available.
Conclusion of Input/Output Operations When the operation or sequence of operations initi­
ated by START I/O or START I/O FAST RE­ LEASE is ended, the channel and the device gener­
ate status conditions. These conditions can be brought to the attention of the program by means of
an I/O interruption, by TEST I/O or CLEAR I/O, or, in certain cases, by START I/O or START I/O FAST RELEASE. The status conditions, as well as
an address and a count indicating the extent of the
operation sequence, are presented to the program in
the form of a channel status word (CSW). Types (,/ Conclusion
Normally an I/O operation at the sub channel lasts
until the device signals channel end. The channel­
end condition can be signaled during the sequence
initiating the operation, or later. When the channel
detects equipment malfunctioning or an I/O system
reset is performed, the channel disconnects the de­
vice without receiving channel end. The program
can force a device to be disconnected prematurely
by issuing CLEAR I/O, HALT I/O, or HALT DE­
VICE.
Conclusion at Operation Initiation
After the addressed channel and sub channel have
been verified to be in a state where START I/O or START I/O FAST RELEASE can be executed, certain tests are performed on the validity of the
information specified by the program and on the
availability of the addressed control unit and I/O device. This testing occurs both during the execu­
tion of START I/O, either during or subsequent to
the execution of START I/O FAST RELEASE, and
during command chaining.
A data-transfer operation is initiated at the sub­
channel and device only when no programming or equipment errors are detected by the channel and
when the device responds with zero status duting the
initiation sequence. When the channel detects or the
device signals any unusual condition during the initi­
ation of an operation, the command is said to be
rejected.
222 System/370 Principles of Operation Rejection of the command during the execution
of START I/O or START I/O FAST RELEASE is
indicated by the setting of the condition code in the PSW. Unless the device is not operational, the con­
ditions that precluded the initiation are detailed by
the portion of the CSW stored by START I/O or ST ART I/O FAST RELEASE. The device is not
started, no interruption conditions are generated,
and the subchannel is available subsequent to the
initiation sequence. The device is immediately avail­
able for the initiation of another operation, provided
the command was not rejected because of the busy
or not-operational condition.
When an unusual condition causes a command to
be rejected during initiation of an I/O operation by
command chaining, an interruption conditioIl: is gen­
erated, and the subchannel is not available until the
condition is cleared. The conditions are indicated to
the program by means of the corresponding status
bits in the CSW. The not-operational condition,
which during the execution of ST ART I/O and
sometimes during the execution of ST ART I/O FAST RELEASE causes condition code 3 to be set,
is indicated by means of the interface-control-check
bit. The new operation at the I/O device is not start­
ed.
When START I/O FAST RELEASE is executed
by a channel independently of the addressed device,
tests on most program-specified information, on
control-unit and device availability, on control-unit
and device status, and on most error conditions are
performed subsequent to the execution of START I/O FAST RELEASE. Some conditions which
would have caused a condition code 1 or 3 to be set
had the instruction been START I/O instead cause
an interruption condition to be generated. The CSW, when stored, indicates that the interruption condi­
tion is a deferred condition code 1 or 3.
Immediate Operations Instead of accepting or rejecting a command, the I/O device can signal the channel-end condition
immediately upon receipt of the command code. An I/O operation causing the channel-end condition to
be signaled during the initiation sequence is called an "immediate operation." When the first CCW designated by the CAW
during a START I/O or START I/O FAST RE­ LEASE executed as a START I/O initiates an im­
mediate operation with command chaining not indi­
cated and command retry not occurring, no interrup­
tion condition is generated. If no command chaining
occurs, the channel-end condition is brought to the
attention of the program by causing ST ART I/O or ST ART I/O FAST RELEASE to store the CSW
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
Previous Page Next Page