or CLEAR I/O. Except for conditions associated
with command chaining and equipment malfunction­
ing, the storing can be caused by the PCI or channel­
end condition and by the execution of HALT I/O or
HALT DEVICE on the selector channel. The con­
tents of the CSW are related to the current values of
the corresponding quantities, although the count is unpredietable after program check, protection check,
chaining check, and after an interruption due to the
PCI flag.
A CSW stored upon the execution of a chain of
operations pertains to the last operation thc channel
executed or attempted to initiate. Information con­
cerning the preceding operations is not preserved
and is not made available to the program.
When an unusual condition causes command
chaining to be suppressed, the premature concluding
of the chain is not explicitly indicated in the CSW. A CSW associated with a concluding due to a condi­
tion occurring 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 indi­
cation is not made available to the program, and the
channel provides the current protection key, com­
mand address, and count, as well as the unusual indi­
cation, with the control-unit-end or device-end bit in
the CSVv. The command address and count fields
pertain to the operation that was t1xecuted. When the execution of a chain of commands is
concluded by an unusual condition detected during
initiation of a new operation, the command address
and count fields pertain to the rejected command.
Except for conditions caused by equipment malfunc­
tioning, concluding at the initiation time can occur of attention, unit check, unit exception, or
program check, and causes both the channel-end and
device-end bits in the CSW to be turned off.
A CSW associated with conditions occurring after
the operation at the sub channel has been concluded
contains zeros in the protection key, command ad­
dress, and count fields, provided the conditions are
not cleared during START I/O or START I/O FAST RELEASE and provided the logout-pending
condition is not indicated. These conditions include
attention, control unit end, and device end (and
channel end when it occurs after the concluding of
an operation on the selector channel by HALT I/O or HALT DEVICE).
When the above conditions, other than logout
pending, are cleared during START I/O or START I/O FAST RELEASE, only the status portion of the CSW is stored, and the original contents of the pro­
tection key, command address, and count fields in
location 64 are preserved. Similarly, only the status
236 System/370 Principles of Operation
bits of the CSW are changed when the command is
rejected or the operation at the subchannel is con­
cluded during the execution of ST ART I/O or START I/O FAST RELEASE or whenever HALT I/O or HALT DEVICE 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
conditions 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 re­
ceived from the device may be invalid. The channel
forces correct parity on invalid CSW fields.
When any I/O instruction cannot be executed
because of a pending logout condition which affects
the operational capability of the channel or subchan­
nel, a full CSW is stored. The fields in the CSW are
all set to zeros, with the exception of the logout­
pending bit and the channel-control-check bit, which
are set to ones.
Protection Key
A CSW stored to reflect the progress of an operation
at the subchannel contains the protection key used
in that operation. The contents of this field are not
affected by programming errors detected by the
channel or by the condition causing termination of
the operation.
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 indi­
cated or occur, the CSW appears as indicated for the
condition higher on the list. The programming er­
rors listed in the table refer to conditions included in
program check. When a CSW has been stored and
the situation exists that a command retry request has
been recognized but the CCW has not been re­
executed, "last-used CCW + 8" is the CCW that is
to be retried.
Count
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 des­
ignated by the CCW. When an input operation is
Condition Channel control check
Status stored by START I/O or START I/O FAST RELEASE
Status stored by HALT I/O or HALT DEVICE Invalid CCW address specified in transfer in channel (TIC) Invalid CCW address in TIC Invalid CCW address generated Invalid command code Invalid count Invalid data address I nval id CCW format Invalid sequence - 2 TICs Protection check
Chaining check
Termination under count control Termination by I/O device
Termination by HALT I/O Termination by CLEAR I/O .,
Suppression of command chaining due to unit check or unit
exception with device end or control unit end
Termination on command chaining by busy, unit check, or
unit exception
Deferred condition code 1 for START I/O FAST RELEASE PCI flag in CCW I nterface control check Channel end after HALT I/O on selector channel Channel end after CLEAR I/O Control unit end
Device end
Attention
Busy
Status modifier
Contents of the CSW Command Address Field
concluded, 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 output 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 pri­
ority; that is, if two conditions ate indicated or oc­
cur, the CSW appears as for the condition higher on
the list.
Status
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 gener­
ated by external events.
When the channel detects several error condi­
tions, all conditions may be indicated or only one
Contents of Field Unpredictable
Unchanged
Unchanged
Address of TIC + 8
Address of TIC + 8
First invalid CCW address + 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 protected COW + 8
Address of last-used CCW + 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 CCW specifying the new operation + 8
Address of last-used CCW + 8
Unpredictable Zero Zero Zero Zero Zero Zero Zero may appear in the CSW, depending on the condition
and model. Conditions associated with equipment
malfunctioning have precedence, and whenever mal­
functioning 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 concluded by pro­
gram check, protection check, or chaining check, the
channel identifies the condition responsible for the
concluding and mayor may not indicate incorrect
length. When a data error has been detected and the
operation is concluded prematurely because of a
program check, protection check, or chaining check,
both data check and the programming error are
identified.
If the CCW fetched on command chaining con­
tains the PCI flag but a programming error in the
contents of the CCW precludes the initiation of the
operation, whether the PCI bit appears in the CSW associated with the interruption condition is unpre­
dictable. Similarly, if a programming error in the
Input/Output Operations 237
Previous Page Next Page