detected. Any errors detected after
device end has been cleared are indi­
cated by signaling unit check with
attention, unit check with control-unit
end, or unit check with device end.
Errors, such as invalid command code or
invalid command-code parity, do not
cause unit check when the device is
working or contains an interruption
condition at the time of selection. Under these circumstances, the device
responds by providing busy status and
indicating the interruption condition,
if any. The command-code invalidity is
not indicated.
Concluding an operation with the unit­
check indication causes command chaining
to be suppressed. Unit check is presented in combination
with channel end and status modifier to
initiate the command-retry procedure.
Programming Notes
1. If a device becomes not ready upon
completion of a command, the ending
interruption condition can be cleared by the TIO function without
generation of unit check due to the
not-ready state, but any subsequent TIO function issued to the device
causes a unit-check indication.
2. In order that sense indications set
in conjunction with unit check are
preserved by the device until
requested by a sense command, some
devices inhibit certain functions
until a command other than the TIO function or no-operation is
received. Furthermore, any command
other than sense, the TIO function,
or no-operation may cause the
device to reset any sense informa­
tion. Similarly, when start-I/O­ fast queuing is provided,
initiation of I/O operations pend­
ing at the time the unit check is
received may be inhibited for other
devices attached to the same
control unit. The initiation of
the pending operations is inhibited
until a subsequent I/O operation
(usually a sense operation) is
successfully initiated at the
device that presented the unit
check. To avoid degradation of the
device and its control unit and to
avoid inadvertent resetting of the
sense information, a sense command
should be issued immediately to any
device signaling unit check.
3. Unit-check status presented either
in the absence of or accompanied by
other status indicates only that
sense information is available to
the basic sense command. Presenta­
tion of either channel end and unit
check or channel end, device end,
and unit check does not provide any
indication as to the kind of condi­
tions encountered by the control
unit, the state of the I/O device,
or whether execution of the I/O operation ever was initiated.
Descriptions of these conditions or
states are provided in the sense
information. Unit Exception Unit exception is caused when the I/O device detects a situation that usually
does not occur. Unit exception includes
si tuat ions such as recogn it i on of a. tape
mark and does not necessarily indicate
an error. During execution of an I/O operation, unit exception has only one
meaning for any particular command and
type of device. Unit exception may be generated when the
device is executing an I/O operation, or
when the device is involved with some
activity associated with an I/O opera­
tion and the condition is of immediate
significance to the program. If the
device detects during the initiation
sequence that the operation cannot be
executed, unit exception is presented to
the channel and appears without channel
end, control-unit end, or device end. Such unit status indicates that no
action has been taken at the device in
response to the command. If the condi­
tion precluding normal execution of the
operation occurs after the I/O operation
has been initiated, unit exception is
accompanied by channel end, control-unit
end, or device end, depending on when
the situation was detected. Any unusual
condition associated with an I/O opera­
tion, but detected after device end has
been cleared, is indicated by signaling
unit exception with attention.
If the I/O device responds with busy
status to a command, the generation of
unit exception is suppressed even when
execution of that command usually causes
unit exception to be indicated.
Concluding an operation with
exception indication causes
chaining and command retry
suppressed.
the unit­
command
to be Some devices present unit exception
accompanied by device end and attention
whenever a device changes from the
not-ready state to the ready state. (See "Device End" in this chapter.) Chapter 13. Input/Output Operations 13-69
CHANNEL STATUS The following status bits are generated
by the channel. Except for the status
bits resulting from equipment malfunc­
tion, they can occur only while the
subchannel is involved with the
execution of an I/O operation.
Program-Controlled Interruption
A program-controlled interruption occurs
when the channel fetches a CCW with the
program-controlled-interruption (PCI) flag set to one. The I/O interruption
due to the PCI flag takes place as soon
as possible after the CCW takes control
of the operation, unless the CCW also
contains the S flag set to one, but may
be delayed an unpredictable amount of
time because I/O interruptions are
disallowed or because of other activity
in the system. When the CCW also
contains a valid S flag, the PCI condi­
tion is not generated until after
channel-program execution is suspended.
The interruption condition due to the PCI flag does not affect the progress of
the I/O operation.
Incorrect Length
Incorrect length occurs when the number
of bytes contained in the storage areas
assigned for the I/O operation is not
equal to the number of bytes requested
or offered by the I/O device. Incorrect
length is indicated for one of the
following reasons:
Long Block.Q.!l Input: During a read,
read-backward, or sense operation, the
device attempted to transfer one or more
bytes to storage after the assigned
storage areas were filled. The extra
bytes have not been placed in storage.
The count in the CSW is zero.
long Block .Q.!l Output: During a write or
control operation, the device requested
one or more bytes from the channel after
the assigned storage areas were
exhausted. The count in the CSW is zero.
Short Block.Q.!l Input: The number of
bytes transferred during a read, read­
backward, or sense operation is insuffi­
cient to fill the storage areas assigned
to the operation. The count in the CSW is not zero. Output: The device
terminated a write or control operation before all information contained in the 13-70 System/370 Principles of Operation assigned storage areas was transferred
to the device. The count in the CSW is
not zero.
Incorrect length is not indicated when
the current CCW has the SlI flag set to
one and the CD flag set to zero. The
indication does not occur for immediate
operations and for operations rejected
during the initiation sequence.
When incorrect length occurs, command
chaining is suppressed, unless the SlI
flag in the CCW is one or unless the
operation is immediate. See the figure "Channel-Chaining Action" in this chap­
ter for the effect of the CD, CC, and
SLI flags on the indication of incorrect
length.
Programming Note
The setting of incorrect length is
unpredictable in the CSW stored during CLEAR I/O, HALT I/O, or HALT DEVICE if
the subchannel was in the working state.
Program Check Program check occurs
errors are detected
Program check can be
ing causes:
when programming
by the channel.
due to the follow-
Invalid CCW-Address Specification: The CAW or the transfer-in-channel command
does not designate the CCW on a double­
word boundary.
Invalid CCW Address: The channel has fetch a CCW from a storage
location which is not available to the
channel. An invalid CCW address can
occur in the channel because the program
has specified an invalid address in the CAW or in the transfer-in-channel
command or because on chaining the chan­
nel has attempted to fetch a CCW from an
unavailable location.
Invalid Command Code: The command code
in the first CCW designated by the CAW or in a CCW fetched on command chaining
has zeros in bit positions 4-7. The
command code is not tested for validity
during data chaining.
Invalid Count: A CCW other than a CCW specifying transfer in channel contains
the value zero in bit positions 48-63.
Invalid IDAW-Address Specification: Channel indirect data addressing is
specified, and the contents of the
data-address field in the CCW do not
designate the first IDAW on an integral
word boundary.
Previous Page Next Page