Unless the command is designed to cause unit
check, such as rewind and unload on magnetic tape,
unit check is not indicated if the command is
properly executed even though the device has
become not ready during or as a result of the
operation. Similarly, unit check is not indicated if
the command can be executed with the device not
ready. Selection of a device that is not ready does
not cause a unit check when the sense command is
issued or when an interruption condition is pending
for the addressed device at the control unit.
If
the device detects during the initiation
sequence that the command cannot be executed,
unit check is signaled to the channel 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
situation precluding proper execution of the
operation occurs after execution has been started,
unit check is accompanied by channel end,
control-unit end, or device end, depending on when
the situation was detected. Any errors associated
with an operation, but detected after device end
has been cleared, are indicated by signaling unit
check with attention.
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.
U nit 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 TEST I/O without
generation of unit check due to the not-ready
state, but any subsequent TEST
I/O
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 test I/O or no-operation
is received. Furthermore, any command other
12-52
IBM 4300 Processors Principles of Operation
than sense, test I/O, or no-operation causes the
device to reset any sense information. 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.
Unit Exception
Unit exception is caused when the I/O device
detects a situation that usually does not occur.
U nit exception includes situations such as
recognition of a tape mark and does not necessarily
indicate an error.
It
has only one meaning for any
particular command and type of device.
Unit exception can be generated only when the
device is executing an I/O operation, or when the
device is involved with some activity associated
with an I/O operation and the situation 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
situation precluding normal execution of the
operation occurs after the execution has been
started, unit exception is accompanied by channel
end, control-unit end, or device end, depending on
when the situation was detected. Any unusual
situation associated with an operation, but detected
after device end has been cleared, is indicated by
signaling unit exception with attention.
A command does not cause unit exception when
the device responds with busy status to the
command during the initial selection.
Concluding an operation with the unit-exception
indication causes command chaining to be
suppressed.
Unit exception along with device end and
attention can also be generated whenever a device
changes from the not-ready state to the ready state.
Channel Status
The following status bits are generated by the
channel. Except for the status bits resulting from
equipment malfunction, 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-