ccw. The content of the command-code field of the
new ccw is ignored, unless it specifies transfer in
Data chaining is considered to occur immediately
after the last byte of data designated by the current
ccw has been transferred to or from the device. When
the last byte has been placed in main storage or ac­
cepted by the device, the new ccw takes over the con­
trol of the operation and replaces the pertinent in­
formation in the subchannel. If the device sends chan­
nel end after exhausting the count of the current ccw
but before transferring any data to or from the storage
area designated by the new ccw, the csw associated
with the termination identifies the new ccw.
If programming errors are detected h ... the new ccw
or during its fetching, the program-check condition is
generated, and the device is signaled to terminate the
operation when it attempts to transfer data designatcd
by the new ccw. If the device signals the channel-end
condition before transferring any data designated by
the new ccw, program check is indicated in the csw
associated with the termination. Unless the address of
the new ccw is invalid or programming errors are de­
tected in an intervening transfer-in-channel command,
the content of the csw pertains to the new ccw. A
data address referring to a nonexistent area or, on
reading, to a protected area causes an error indication
only after the I/O device has attempted to transfer
data to or from the invalid location, but an address
exceeding the addressing capacity of the model is de­
tected immediately upon fetching the ccw.
Data chaining during an input operation causes the
new ccw to be fetched when all data designated by
the current ccw have been placed in main storage. On an output operation, the channel may fetch the new
ccw from main storage ahead of the time data chain­
ing occurs. The earliest such prefetching may occur
is when 16 bytes still remain to be transferred under
the control of the current ccw. Any programming
errors in the prefetched ccw, however, do not affect
the execution of the operation until all data desig­
nated by the current ccw have been transferred to the I/O device. If the device terminates the operation be­
fore all data designated by the current ccw have 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 pre­
fetched and buffered in the channel. If the prefetched
ccw specifies transfer in channel, only one more ccw
is fetched before the exhaustion of the current ccw.
Programming Notes
Data chaining permits information to be rearranged
as it is transferred between main storage and the I/O device. Data chaining also permits a block of informa­
tion to be transferred to or from noncontiguous areas
of storage, and, when used in conjunction with the
skipping function, it permits the program to place in
storage selected portions of a block of data.
When during an input operation, the program
specifies data chaining to a location into which data
have been placed under the control of the current
ccw, the channel fetches the new contents of the lo­
cation, even if the location contains the last byte
transferred under thc control of the current ccw.
The program, therefore, can use self-describing rec­
ords; that is, it can chain to a ccw that has been read
under the control of the current ccw. However,
since the program is not notified of any data errors
until the end of the operation, there is no assurance
that the ccw is correct. The ccw in main storage may
be invalid even though its parity is good.
Command Chaining
During command chaining, the new ccw fetched by
the channel specifies a new I/O operation. The chan­
nel fetches the new ccw and initiates the new oper­
ation 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 indicat­
ing the amount of data transferred during the current
operation is not made available to the program. For
operations involving data transfer, the new command
always applies to the next block 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. If a condition
such as unit check, unit exception, or incorrect length has occurred, the sequence of operations is termi­
nated, and the status associated with the current op­
eration causes an interruption condition to be gener­
ated. The new ccw in this case is not fetched. The
incorrect-length condition does not suppress command
chaining if the current ccw has the SLI Hag on.
An exception to sequential chaining of ccw's occuts
when the I/O device presents the status-modifier con­
dition with the device-end signal. When command
chaining is specified and no unusual conditions have
been detected, the combination of status-modifier and
device-end bits causes the channel 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 the operation specifies
the operation to be executed, and the last ccw indi­
cates whether another operation follows.
Input/Output Operations 99
Programming Note
Command chaining makes it possible for the program
to initiate transfer of multiple blocks of data by means
of a single START I/O. It also permits a sub channel to
be set up for execution of auxiliary functions, such as
positioning the disk access mechanism, and for data
transfer operations without interference by the pro­
gram at the end of each operation. Command chain­
ing, in conjunction with the status-modifier condition,
permits the channel to modify the normal sequence of
operations in response to signals provided by the I/O device.
Skipping is the suppression of main-storage references
during an I/O operation. It is defined only for read,
read backward, and sense operations and is controlled
by the skip Bag, which can be specified individually
for each ccw. When the skip Hag is one, skipping oc­
curs; when zero, normal operation takes place. The
setting of the skip flag is ignored in all other oper­
Skipping affects only the handling of information
by the channel. The operation at the I/O device pro­
ceeds normally, and information is transferred to the
channel. The channel keeps updating the count but
does not place the information in main storage. If the
chain-command or chain-data flag is one, a new ccw
is obtained when the count reaches zero. In the case
of data chaining, normal operation is resumed if the
skip Hag in the new ccw is zero.
No checking for invalid or protected data addresses
takes place during skipping, except that the initial
data address in the ccw cannot exceed the addressing
capacity of the model.
Programming Note
Skipping, when combined with data chaining, permits
the program to place in main storage selected portions
of a block of information from an I/O device. Program-Controlled Interruption
The program-controlled interruption ( PCI) function
permits the program to cause an I/O interruption dur­
ing execution of an I/O operation. The function is con­
trolled by the PCI flag in the ccw. The flag can be on
either in the first ccw specified by START I/O or in a
ccw fetched during chaining. Neither the PCI Hag nor
the associated interruption affects the execution of the
current operation.
Whenever the PCI Hag in the ccw is on, the channel
attempts to interrupt the program. When the first ccw
associated with an operation contains the PCI Bag, 100 either initially or upon command chaining, the inter­
ruption may occur as early as immediately upon the
initiation of the operation. The PCI flag in a ccw
fetched on data chaining causes the interruption to
occur after all data designated by the preceding ccw
have been transferred. The time of the interruption,
however, depends on the model and the current ac­
tivity in the system and may be delayed even if the
channel is not masked. No predictable relation exists
between the time the interruption due to the PCI Hag
occurs and the progress of data transfer to or from the
area designated by the ccw.
If chaining occurs before the interruption due to
the PCI flag has taken place, the PCI condition is car­
ried over to the new ccw. This carryover occurs both
on data and command chaining and, in either case,
the condition is propagated through the transfer-in­
channel command. The PCI conditions are not stacked;
that is, if another ccw is fetched with a PCI Bag before
the interruption due to the PC! Hag of the previous
ccw has occurred, only one interruption takes place.
A csw containing the PCI bit may be stored by an
interruption while the operation is still proceeding or
upon the termination of the operation.
When the csw is stored by an interruption before
the operation or chain of operations has been termi­
nated, the command address is eight higher than the
address of the current ccw, and the count is unpre­
dictable. All unit-status bits in the csw are off. If the
channel has detected any unusual conditions, such as
channel data check, program check, or protection
check by the time the interruption occurs, the corre­
sponding channel-status bit is on, although the con­
dition in the channel is not reset and is indicated
again upon the termination of the operation.
Presence of any unit-status bit in the csw indicates
that the operation or chain of operations has been
terminated. The csw in this case has its regular for­
mat with the PCI bit added.
The setting of the PCI Bag is inspected in every ccw
except those specifying transfer in channel. In a ccw
specifying transfer in channel, the setting of the Bag
is ignored. The PCI Hag is ignored also during initial
program loading.
Programming Notes Since no unit-status bits are placed in the csw associ­
ated with the termination of an operation on the se­
lector channel by HALT I/O, the presence of a unit­
status bit with the PCI bit is not a necessary condition
for the operation to be terminated. When the selector
channel contains the PCI bit at the time the operation
is terminated by HALT I/O, the csw associated with
the termination is indistinguishable from the csw pro-
Previous Page Next Page