MMMMOIOO Data Address
o 8 31
5 C C 5 K P I
D C l I C D 5 0 //////// Count I P I A
32 40 48 63
A sense operation is initiated at the I/O device, and the subchannel is set up
to transfer data from the device to
storage. The data is placed in storage
in an ascending order of addresses,
starting with the address specified in
the CCW. The sense command is similar to a read
command that the data is obtained
from sense indicators rather than from a
record source.
The basic sense command (modifier bits
set to zeros) initiates a sense opera­
tion on all I/O devices and causes the
retrieval of up to 32 bytes of data.
The basic sense command does not initi­ ate any operation other than the reading
of sense indicators. The basic sense
command sent to an addressable control
unit is accepted even though the
addressed I/O device is in the not-ready
state. If the control unit detects an
error during the sense operation, unit
check is sent with the channel-end
status condition.
The purpose of the basic sense command
is to provide data detailed enough to
ascertain the actual state of the device
and unusual conditions associated with
the execution of the I/O operation
during which the error was detected.
The first six bits of the first sense
data byte (sense byte 0) retrieved by
the basic sense command are common to
all I/O devices. The six bits, when set
to ones, designate the following:
Bit Designation 0 Command reject
1 Intervention required
2 Bus-out check 3 Equipment check
4 Data check
5 Overrun The following is the meaning of the
first six bits:
Command Reject: The device has detected a programming error. A command has been received which the device is not designed to execute, such as read back­
ward issued to a direct-access-storage
device, or which the device cannot
execute because of its present state,
such as write issued to a file-protected tape unit. Command reject is indicated
when the program issues an invalid
sequence of commands, such as write to a direct-access-storage device without
previous designation of the block. Command reject may also be indicated
when invalid data is transferred and the
data is treated as an extension of the
command. For example, command reject is indicated when an invalid seek argument is transferred to a direct-access­
storage device.
Intervention Required: The last opera­
tion could not be executed because of a situation requiring some type of inter­
vention at the device. This bit indi­
cates situations such as the hopper in a
card punch being empty or the printer
being out of paper. It is also turned
on when the addressed device is not
ready, is in test mode, or is not
provided on the control unit. Bus-Out Check: The device or the
control unit has received a data byte or
a command code with an invalid parity
from the channel. During writing, bus­
out check indicates that incorrect data
may have been recorded at the device,
but this does not cause the operation to
be terminated prematurely. Parity
errors on command codes and control
information cause the operation to be immediately terminated and suppress
checking for situations that would cause
command reject and intervention
required.
Equipment Check: During the last opera­
tion, the device or the control unit has
detected equipment malfunctioning, such
as an invalid card-hole count or a printer-buffer parity error.
Data Check: The device or the control
unit a data error other
than those included in bus-out check.
Data check identifies errors associated
with the recording medium and includes
errors such as reading an invalid card
code or detecting invalid parity on data
recorded on magnetic tape. On an input operation, data check indi­
cates that incorrect data may have been
placed in storage. The control unit
forces correct parity on data sent to
the channel. On writing, data check
indicates that incorrect data may have
been recorded at the device. Unless the
operation is of a type where the error
precludes meaningful continuation, data
errors on reading and writing do not
cause the operation to be terminated
prematurely. Chapter 13. Input/Output Operations 13-51
Overrun: The overrun condition occurs
when the channel fails to respond to the
control unit in the anticipated time
interval to a request for service from
the I/O device. When the total activity
initiated by the program exceeds the
capability of the channel, an overrun
may occur when data is transferred to or
from a control unit that is either using
the data-streaming facility or is not
buffered. Data streaming is described
in the publication IBM System/360 and
System/370 I/O Interface Channel to
Control Unit Original Equipment Manufac­
turers' Information, GA22-6974. An
overrun condition also may occur when
the I/O device receives the new command
too late during command chaining. When the channel fails to accept a byte
on an input operation, the following
data transferred to storage may be used
to fill the gap. On an output
operation, overrun indicates that data
recorded at the device may be invalid.
All information significant to the use
of the device normally is provided in the first byte. Any bit positions
following those used for programming
information may contain diagnostic
information, and the total number of
sense bytes for the basic sense command
(command code 04) may extend up to 32
bytes as needed. The number and the
meaning of the sense bytes extending
beyond the first byte are peculiar to
the type of I/O device and are specified
in the Sl publication for the device.
The basic sense command has zero modifi­
er bits. This command initiates a sense
operation on all devices and cannot
cause the command-reject, intervention­
required, data-check, or overrun bit to
be set to one. If the control unit
detects an equipment malfunction, or
invalid parity of the sense command
code, the equipment-check or bus-out­
check bit is set to one, and unit check
is indicated in the unit-status byte.
Devices that can provide special diag­
nostic sense information or can be
instructed to perform other special
functions by use of the sense command
may define modifier bits for the control
of these functions. The special sense
operations may be initiated by a unique
combination of modifier bits, or a group
of codes may specify the same function.
Any remaining sense command codes may be
considered invalid, thus causing the
unit-check indication, or may cause the
same action as the basic sense command,
depending upon the type of device.
The sense information that pertains to
the last I/O operation or other action
at a device may be reset any time after
the completion of a sense command
addressed to that device. Any command
addressed to the control unit of a
device, other than the no-operation
13-52 System/370 Principles of Operation command and the command which results
from the TIO function, is allowed to
reset the sense information, provided
that the busy bit is not included in the
initial status. The sense information
may also be changed as a result of asyn­
chronous actions, as when the device changes from the not-ready to ready
state. (See "Device End" in this chap­
ter. )
A CCW used in a sense operation is
inspected for every flag --CD, CC, SLI, SKIP, S, PCI, and IDA. Bit positions 0-3 of the CCW contain modifier bits. 11100100 Data Address
o 8 31 S C C S K P I
D C L I C D S 0 //////// Count
I P I A
32 40 48 63
Execution of the sense-ID command
proceeds exactly as that of a read
command, except that data is obtained
from sensing indicators rather than from
a record source. The data source is up
to seven bytes in length.
The control unit and I/O device may
properly execute the sense-ID command,
may execute the command as the basic
sense command, or may reject the sense­
ID command with unit-check status.
Refer to the Sl publication for the
control unit and I/O device.
The sense-ID command does not initiate
any operations other than the sensing of
the type/model number. If the addressed
unit is available and not busy, then
execution of the sense-ID command is
accomplished. Basic sense data may be
reset as a result of executing the
sense-ID command.
Basic sense
result of
command.
data may be reset as a
executing the sense-ID
Bytes
o
1,2
3
4,5
6
Contents
FF hex
Control-unit type number
Control-unit model number
I/O-device type number I/O-device model number
Previous Page Next Page