Flags in Current Action in Channel upon Exhaustion of Count or Receipt of Channel End CCW CD CC SLI 0 0 0 0 0 1 0 0 I mmediate Operation
End, -
End, - Stop,IL Stop, - Stop,IL Regular Operation
End, -
End,- II III End,IL End, - End,IL 0 Chain command Chain command Chain command Chain command Chain command Chain command 0 0 0 0 End, -
End, -
End, -
End, - Chain data Chain data Chain data Chain data Count exhausted, end of block at device not reached. II Count exhausted and channel end from device. III Count not exhausted and channel end from device.
End The operation is terminated. If the operation is immediate
and has been specified by the first CCW associated with a
START 1/0, a condition code 1 is set, and the status
portion of the CSW is stored as part of the execution of the
START 1/0. In all other cases an interruption condition
is generated in the subchannel. Stop The device is signaled to terminate data transfer, but the subchannel remains in the working state until channel end
is rec:eived; at this time an interruption condition is generated in the subchannel. I L Incorrect length is indicated with the interruption condition.
Channel Chaining Action
address referring to a nonexistent or protected area
causes an error indication only after the I/O device
has attempted to transfer data to or from the invalid
location.
Data chaining during an input operation causes
the new CCW to be fetched when all data designat­
ed by the current CCW has been placed in main
storage. On an output operation, the channel may
fetch the new CCW from main storage ahead of the
time data chaining occurs. Any programming errors
in the prefetched CCW, however, do not affect the
execution of the operation until all data designated
by the current CCW has been transferred to the I/O device. If the device concludes the operation before
all data de;signated by the current CCW has been
transferred, the conditions associated with the pre­
fetched CCW are not indicated to the program. Only one CCW describing a data area may be
prefetched and buffered in the channel. If the pre­
fetched CCW specifies transfer in channel, only one
more CC\V is fetched before the exhaustion of the
current CCW. 214 System/370 Principles of Operation End,IL End,IL End,IL End,IL I ncorrect length is not indicated. Chain The channel performs command chaining upon
command receipt of device end. Chain data The channel immediately fetches a new CCW for
the same operation.
The situation where the count is zero but data
chaining is indicated at the time the device
provides channel end cannot validly occur. When
data chaining is indicated, the channel fetches the
new CCW after transferring the last byte of data
designated by the current CCW but before the
device provides the next request for data or status
transfer. As a result, the channel recognizes the
channel end from the device only after it has
fetched the new CCW, which cannot contain a
count of zero unless a programming error has been
made. PTogranrumdng Data chaining may be used to rearrange information
as it is transferred between main storage and an I/O device. Data chaining permits blocks of information
to be transferred to or from noncontiguous areas of
storage, and, when used in conjunction with the
skipping function, data chaining enables the program
to place in main storage selected portions of a block
of data.
When, during an input operation, the program
specifies data chaining to a location into which data
has been placed under the control of the current
CCW, the channel, in fetching the next CCW, fetch­
es the new contents of the location. This is true even
if the location contains the last byte transferred un­
der the control of the current CCW. When a channel
program data-chains to a CCW placed in storage by
the CCW specifying data chaining, the input block is
said to be self -describing. A self -describing block
contains one or more CCWs that specify storage
locations and counts for subsequent data in the same
input block.
The use of self -describing blocks is equivalent to
the use of unchecked data. An I/O data-transfer
malfunction that affects validity of a block of in­
formation is signaled only at the completion of data
transfer. The error condition normally does not pre­
maturely terminate or otherwise affect the execution
of the operation. Thus, there is no assurance that a
CCW read as data is valid until the operation is com­
pleted. If the CCW thus read is in error, use of the
CCW in the current operation may cause subsequent
data to be placed in wrong locations in main storage
with resultant destruction of its contents, subject to
the control of the protection system.
Command Chaining
During command chaining, the new CCW fetched
by the channel specifies a new I/O operation. The
channel fetches the new CCW and initiates the new
operation upon the receipt of the device-end signal
for the current operation. When command chaining
takes place, the completion of the current operation
does not cause an I/O interruption, and the count
indicating the amount of data transferred during the
current operation is not made available to the pro­
gram. For operations involving data transfer, the
new command always applies to the next block of
data at the device.
Command chaining takes place and the new oper­
ation is initiated only if no unusual conditions have
been detected in the current operation. In particular,
the channel initiates a new I/O operation·by com­
mand chaining upon receipt of a status byte contain­
ing only the following bit combinations: device end,
device end and status modifier, device end and chan­
nel end, device end and channel end and status modi­
fier. In the former two cases a channel end must
have been signaled before device end, with all other
status bits off. If a condition such as attention, unit
check, unit exception, incorrect length, program
check, or protection check has occurred, the se­
quence of operations is concluded, and the status
associated with the current operation causes an in­
terruption condition to be generated. The new CCW
in this case is not fetched. The incorrect-length con­
dition does not suppress command chaining if the
current CCW has the SLI flag on.
An exception to sequential chaining of CCWs
occurs when the I/O device presents the status­
modifier condition with the device-end signal. When
command chaining is specified and no unusual con­
ditions have been detected, the combination of
status-modifier and device-end bits causes the chan­
nel to fetch and chain to the CCW whose main­
storage address is 16 higher than that of the current
CCW.
When both command and data chaining are used,
the first CCW associated with operation speci-
fies the operation to be executed, and the last CCW
indicates whether another operation follows.
Programming Note
Command chaining makes it possible for the pro­
gram to initiate transfer of multiple blocks of data by
means of a single START I/O or START I/O FAST
RELEASE. It also permits a subchannel to be set up
for execution of auxiliary functions, such as position­
ing the disk-access mechanism, and for data-transfer
operations without interference by the program at
the end of each operation. Command chaining, in
conjunction with the status-modifier condition, per­
mits the channel to modify the normal sequence of
operations in response to signals provided by the I/O device.
Skipping
Skipping is the suppression of main-storage refer­
ences during an I/O operation. It is defined only for
read, read backward, and sense operations, and is
controlled by the skip flag, which can be specified
individually for each CCW. When the skip flag is
one, skipping occurs; when zero, normal operation
takes place. The setting of the skip flag is ignored in
all other operations.
Skipping affects only the handling of information
by the channel. The operation at the I/O device
proceeds normally, and information is transferred to
the channel. The channel keeps updating the count
but does not place the information in main storage.
Chaining is not precluded by skipping. In the case of
data chaining, normal operation is resumed if the
skip flag in the new CCW is zero.
No checking for invalid or protected data address­
es takes place during skipping.
Programming Note
Skipping, when combined with data chaining, per­
mits the program to place in main storage selected
portions of a block of information from an I/O de­
vice.
Program-Controlled Interruption
The program-controlled interruption (PCI) function
permits the program to cause an I/O interruption
during execution of an I/O operation. The function
is controlled by the PCI flag in the CCW. The flag
can be on either in the first CCW specified by
START I/O or START I/O FAST RELEASE or in
a CCW fetched during chaining. Neither the PCI
flag nor the associated interruption affects the execu­
tion of the current operation.
Whenever the PCI flag in the CCW is on, the
channel attempts to interrupt the program. When the
Input/Output Operations 215
Previous Page Next Page