Content of Channel Status Word
The content of the csw depends on the condition caus­
ing the storing of the csw and on the programming
method by which the information is obtained. The
status portion always identifies the condition that
caused storing of the csw. The protection key, com­
mand address, and count fields may contain informa­
tion pertaining to the last operation or may be set to
zero, or the original contents of these fields at location
64 may be left unchanged.
Information Provided by Channel Status Word
Conditions associated with the execution or termi­
nation of an operation at the subchannel cause the
whole csw to be replaced. Such a csw can be stored only by an I/O interruption
or by TEST I/O. Except for conditions associated with
command chaining, the storing can be caused by the PCI or channel-end condition, by the execution of
HALT I/O on the selector channel, or by equipment
malfunction. The contents of the csw are related to the
current values of the corresponding quantities, al­
though the count is unpredictable after programming
errors and after an interruption due to the PCI flag.
A csw stored upon the execution of a chain of oper­
ation pertains to the last operation the channel exe­
cuted or attempted to initiate. Information concerning
the preceding operations is not preserved and is not
made available to the program.
When an unusual condition causes command chain­
ing to be suppressed, the premature termination of the
chain is not explicitly indicated in the csw. A csw
associated with a termination due to a condition occur­
ing at channel-end time contains the channel-end bit
and identifies the unusual condition. When the device
signals the unusual condition with control unit end or
device end, the channel-end indication is not made
available to the program, and the channel provides the
current protection key, command address, and count,
as well as the unusual indication, with the control­
unit-end or device-end bit in the csw. The command
address and count fields pertain to the operation that
was executed.
When the execution of a chain of commands is ter­
minated by an error detected during initiation of a
new operation, the command address and count fields
pertain to the rejected command. Termination at initi­
ation time can occur because of attention, unit check,
unit exception, program check, or equipment mal­
functioning and causes both the channel-end and de­
vice-end bits in the csw to be off.
114
A csw associated with conditions occurring after the
opcration at the subchannel has been terminated con­
tains zeros in the protection key, command address,
and count fields, provided the conditions are not
cleared by START I/O. These conditions include atten­
tion, control unit end, and device end (and channel
end when it occurs after termination of an operation
on the selector channel by HALT I/O). When the above conditions are cleared by START I/O, only the status portion of the csw is stored, and the
original contents of the protection key, command ad­
dress, and count fields in location 64 are preserved.
Similarly, only the status bits of the csw are changed
when the command is rejected or the operation at the
subchannel is terminated during the execution of START I/O or whenever HALT I/O causes csw status to be
stored.
Errors detected during execution of the I/O oper­
ation do not affect the validity of the csw unless the
channel-control-check or interface-control-check con­
ditions are indicated. Channel control check indicates
that equipment errors have been detected, which can
cause any part of the csw, as well as the address in the
psw identifying the I/O device, to be invalid. Interface
control check indicates that the address identifying the
device or the status bits received from the device may
he invalid. The channel forces correct parity on invalid
csw fields.
Protection Key
A csw stored to reflect the progress of an operation at
the su bchannel contains the protection key used in
that operation. The content of this field is not affected
by programming errors detected by the channel or by
the condition causing termination of the operation.
Models in which the protection feature is not im­
plemented cause an all-zero key to be stored.
Command Address
When the csw is formed to reflect the progress of the I/O operation at the subchannel, the command address
is normally eight higher than the address of the last
ccw used in the operation.
The following table lists the contents of the com­
mand address field for all conditions that can cause
the csw to be stored. The conditions are listed in order
of priority; that is, if two conditions are indicated or
occur, the csw appears as indicated for the condition
higher on the list. The programming errors listed in
the table refer to conditions included in program
check.
CONDITION Channel control check Status stored by START I/O Status stored by HALT I/O Invalid CCW address spec. in TIC Invalid CCW address in TIC Invalid CCW address
generated
Invalid command code
Invalid count
Invalid data address
Invalid CCW format
Invalid sequence -2 TIC's
Protection check
Chaining check
Termination under count
control
Termination by I/O device
Termination by HALT I/O Suppression of command
chaining due to unit check
or unit exception with de­
vice end or control unit end
Termination on command
chaining by attention, unit
check, or unit exception
Program-controlled interrup-
tion
Interface control check Ch. end after HIO on seI. ch.
Control unit end
Device end
Attention
Busy Status modifier
Count
CONTENT
Unpredictable
Unchanged
Unchanged
Address of TIC + 8
Address of TIC + 8
Address first invalid CCW + 8
Address of invalid CCW + 8
Address of invalid CCW + 8
Address of invalid CCW + 8
Address of invalid CCW + 8
Address of second TIC + 8
Address of invalid CCW + 8
Address of last-used CCW + 8
Address of last-used CCW + 8
Address of last-used CCW + 8
Address of last-used CCW + 8
Address of last CCW used in
the completed operation + 8
Address of CCW specifying
the new operation + 8
Address of last-used CCW + 8
Address of last-used CCW + 8 Zero Zero Zero Zero Zero Zero The residual count, in conjunction with the original
count specified in the last ccw used, indicates the
number of bytes transferred to or from the area desig­
nated by the ccw. When an input operation is termi­
nated, the difference between the original count in the
ccw and the residual count in the csw is equal to the
number of bytes transferred to main storage; on an out­
put operation, the difference is equal to the number
of bytes transferred to the I/O device.
The following table lists the contents of the count
field for all conditions that can cause the csw to be
stored. The conditions are listed in the order of prior­
ity; that is, if two conditions are indicated or occur,
the csw appears as for the condition higher on the list.
CONDITION
Channel control check Status stored by START I/O Status stored by HALT I/O Program check
Protection check
Chaining check
Termination under count
control
Termination by I/O device
Termination by HALT I/O Suppression of command
chaining due to unit check,
unit exception with device
end, or control unit end
Termination on command
chaining by atention, by
unit check, or unit
exception
Program-controlled inter-
ruption
Interface control check Ch. end after HIO on sel. ch.
Control unit end
Device end
Attention
Busy Status Modifier
Status CONTENT Unpredictable
Unchanged
Unchanged
Unpredictable
Unpredictable
Correct
Correct
Correct
Correct
Correct. Residual count of last CCW used in the completed
operation.
Correct. Original count of CCW specifying the new
operation.
Unpredictable
Correct Zero Zero Zero Zero Zero Zero The status bits identify the conditions that have been
detected during the I/O operation, that have caused a
command to be rejected, or that have been generated
by external events.
The csw contains at least one status bit, unless it is
stored by HALT I/O issued to the multiplexor channel
or the interruption condition responsible for the stor­
ing is caused by HALT r/o issued to the selector chan­
nel. In both of the latter cases, all status bits may be
off.
When the channel detects several error conditions,
all conditions may be indicated or only one may ap­
pear in the csw, depending on the condition and
model. Conditions associated with equipment mal­
fU'hctioning have precedence, and whenever maHunc­
tioning causes an operation to be terminated, channel
control check, interface control check, or channel data
check is indicated, depending on the condition. When
an operation is terminated by program check, pro­
tection check, or chaining check, the channel identifies Input/Output Operations 115
Previous Page Next Page