Device lEnd
Device end is caused by the completion of an I/O operation at the device or, on some devices, by man­
ually changing the device from the not-ready to the
ready st.ate. The condition normally indicates that
the I/O device has become available for use for an­
other operation.
Each I/O operation causes a device-end condi­
tion, and there is only one device end to an opera­
tion. The device-end condition is not generated
when any programming or equipment malfunction is
detected during initiation of the operation. When
command chaining takes place, only the device end
of the last operation of the cJ1ain is made available to
the program unless an unusual condition is detected
during the initiation of a chained command, in which
case the chain is concluded without the device-end
indication.
The device-end condition associated with an I/O operation is generated either simultaneously with the
channel·-end condition or later. On data-transfer
operations on devices such as magnetic tape units,
the device concludes the operation at the time chan­
nel end is generated, and both device end and chan­
nel end occur together. On buffered devices, such as
an IBM 3211 Printer Model 1, the device-end condi­
tion occurs upon completion of the mechanical oper­
ation. For control operations, device end generat­
ed at the completion of the operation at the device.
The operation may be completed at the time channel
end is generated or later.
When command chaining is specified in the sub­
channel, receipt of the device-end signal, in the ab­
sence of any unusual conditions, causes the Ghannel to initiate a new I/O operation. Unit Check Unit check indicates that the I/O device or control
unit has detected an unusual condition that is de­
tailed by the information avai!able to a sense com­
mand. Unit check may indicate that a programming
or an equipment error has been detected, that the
not-ready state of the device has affected the execu­
tion of the command or instruction, or that an ex­
ceptional condition other than the one identified by
unit exception has occurred. The unit-check bit
provides a summary indication of the conditions
identified by sense data.
An error condition causes the unit-check indica­
tion only when it occurs during the execution of a
command or TEST I/O, or during some activity
associated with an I/O operation. Unless the error
condition pertains to the activity initiated by a com­
mand and is of immediate significance to the pro­
gram, the condition does not cause the program to
232 System/370 Principles of Operation
be alerted after device end has been cleared; a mal­ funCtion may, however, cause the device to become
not ready. U nit check is indicated when the existence of the
not-ready state precludes a satisfactory execution of
the command, or when the command, by its nature,
tests the state of the device. When no interruption
conditiop is pending for the addressed device at the
control unit, the control unit signals unit check when
TEST I/O or the no-operation control command is
issued to a not-ready device. In the case of no­
operation, the command is rejected, and channel end
and device end do not accompany unit check. 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 proper­
ly executed even though the device has become not
ready during or as a result of the operation. Similar­
ly, unit check is not indicated if the command can be
executed with the device not ready. The IBM 2150 Console, for example, accepts and executes the
alarm control order when the printer is not ready.
Selection of a device in the not-ready state does not
cause a unit-check indication when the sense com­
mand is issued, and whenever an interruption condi­
tion is pending for the addressed device at the con­
trol unit.
If the device detects during the initiation sequence
that the command cannot be executed, unit check is
presented to the channel and appears without chan­
nel end, control unit end, or device end. Suchunit
status indicates that no action has peen taken at the
device in response to the command. If the condition
precluding proper execution of the operation occurs
after execution has been started, unit check is accom­
panied by channel end, control unit end, or device
end, depending on when the condition was detected.
Any errors associated with an operation, but detect­
ed 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 a pending interrup­
tion condition at the time of selection. Under these the device responds by providing the
busy bit and indicating the pending interruption con­
dition, if any. The command code invalidity is not
indicated.
Concluding of an operation with the unit-check
indication callses command chaining to be pressed. Unit check is presented in combination with chan­
nel end and status modifier to initiate the command
retry procedure.
Programming Note
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.
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 than sense, test I/O, or no­
operation causes the device to reset any sense in­
formation. 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 de­
tects a condition that usually does not occur. Unit exception includes conditions 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.
The unit-exception condition cal\ 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 condition
is of immedicate significance to the program. If the
device detects during the initiation sequence that the
operation cannot be executed, unit exception is pre­
sented to the channel and appears without channel
end, control unit end, or device end. Such unit sta­
tus indicates that no action has been taken at the
device in response to the command. If the condition
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 !he condition was
detected. Any unusual conditions associated with an
operation, but detected after device end has been
cleared, are indicated by signaling unit exception
with attention.
A command does not cause unit exception when
the device responds to the command during the ini­
tial selection with busy status.
Concluding an operation with the unit-exception
indication causes command chaining to be sup­
pressed.
Channel Status Conditions
The following conditions are detected and indicated
by the channel. Except for the conditions caused by
equipment malfunctioning, they can occur only while
the subchannel is involved with the execution of an I/O operation.
Program-Controlled Interruption
The program-controlled interruption condition is
generated when the channel fetches a CCW with the
program-controlled interruption (PCl) flag on. The
interruption due to the PCI flag takes place as soon
as possible after the CCW takes control of the opera­
tion but may be delayed an unpredictable amount of
time because of masking of the channel or other
activity in the system.
Detection of the PCI condition 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 re­
quested or offered by the I/O device. Incorrect
length is indicated for one of the following Long Block on 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 main storage. The count in the CSW is zero.
Long Block on Output: During a write or control
operation the device requested one or more bytes
from the channel after the assigned main-storage
areas were exhausted. The count in the CSW is
zero.
Short Block on Input: The number of bytes trans­
ferred during a read, read-backward, or sense opera­
tion is insufficient to fill the storage areas assigned to
the operation. The count in the CSW is not zero.
Short Block on Output: The device terminated a
write or control operation before all information
contained in the assigned storage areas was trans­
ferred to the device. The count in the CSW is not zero.
The incorrect-length indication is suppressed
when the current CCW has the SLI flag and does
not have the CD flag. The indication does not occur
for immediate operations and for operations rejected
during the initiation sequence.
Presence of the incorrect-length condition sup­
presses command chaining unless the SLI flag in the Input/Output Operations 233
Previous Page Next Page