to execute an I/O instruction while in
the problem state. EXECUTION OF INPUT/OUTPUT OPERATIONS The channel can execute six commands:
write, read, read backward, control,
sense, and transfer in channel. Each
command except transfer in channel
initiates a corresponding I/O operation.
The term "I/O operation" refers to the
activity initiated by a command in the I/O device and associated subchannel.
The subchannel is involved with the
execution of the operation from the
initiation of the command until the
channel-end signal is received or, in
the case of command chaining, until the
device-end signal is received. The
operation in the device lasts until
device end is signaled. BLOCKING OF DATA
Data recorded by an I/O device may be
divided into blocks. The length of a
block depends on the device; for
example, a block can be a card, a line
of printing, or the information recorded
between two consecutive gaps on magnetic
tape.
The maximum amount of information that
can be transferred in one I/O operation
is one block. An I/O operation is
terminated when the associated storage
area is exhausted or the end of the
block is reached, whichever occurs
first. For some operations, such as
writing on a magnetic-tape unit or at an
inquiry station, blocks are not defined,
and the amount of information trans­
ferred is controlled only by the
program.
CHANNEL-ADDRESS WORD The channel-address word (CAW) specifies
the subchannel key, the suspend-control
bit, and the address of the first CCW associated with START I/O or START I/O FAST RELEASE. The channel refers to the CAW only during the execution of START I/O or START I/O FAST RELEASE. The CAW is fetched from real storage location 72
of the CPU issuing the instruction. The
pertinent information thereafter is
stored in the subchannel, and the
program is free to change the contents
of the CAW. Fetching of the CAW by the
channel does not affect the contents of
the location.
The CAW has the following format: CCW Address
o 4 8 31
The fields in the CAW are allocated for
the following purposes:
Subchannel Key: Bits 0-3 form the
access key for all fetching of CCWs, IDAWs, and output data and for the stor­
ing of input data associated with START I/O and START I/O FAST RELEASE. This
key is matched with a storage key during
these storage references. For details,
see the section "Key-Controlled
Protection" in Chapter 3, "Storage."
Suspend Control Bit 4 of the CAW controls execution of the suspend func­
tion for the channel program identified
by the CAW. The setting of the
suspend-control bit applies to the chan­ nel program specified by the CAW. When
bit 4 is set to one, suspend control is
specified, and channel-program suspen­
sion occurs when a valid S flag is
detected in a CCW. When bit 4 is set to
zero, suspend control is not specified,
and the presence of the S flag in any CCW of the channel program causes the
program-check condition to be
recognized.
If the suspend-and-resume facility is
not provided for the model, the
suspend-control bit must be zero; other­
wise, a program-check condition is
recognized, and the I/O operation is not
initiated at the device. When the
suspend-and-resume facility is provided
for the model but the suspend function
is not available for the addressed
subchannel, bit 4 is ignored, but any
occurrence of an S flag in the channel
program causes a program-check condition
to be recognized. CCW Address: Bits 8-31 designate the
location of the first CCW in absolute
storage.
Bit positions 5-7 of the CAW must
contain zeros. The three rightmost bits
of the CCW address must be zeros to
specify the CCW on integral boundaries
for doublewords. If either of these
restrictions is violated, an error condition is recognized during the
execution of START I/O or START I/O FAST
RELEASE. If the CCW address specifies a
storage location which is not available
or is protected against fetching, START I/O and, in some cases, START I/O FAST
RELEASE, cause an error condition to be
recognized. When a programming-error
condition is recognized during the
execution of START I/O or START I/O FAST
RELEASE, the status portion of the CSW is stored, with the protection-check or
program-check bit set to one. In this
event, the I/O operation is not initi­
ated at the device. Chapter 13. Input/Output Operations 13-37
Programming Note
Bit positions 5-7 of the CAW, which
presently must contain zeros, may in the
future be assigned to the control of new
functions. It is, therefore, recom­
mended that these bit positions not be
set to ones for the purpose of obtaining
an intentional program-check indication. CHANNEL-COMMAND WORD The channel-command word (CCW) specifies
the command to be executed and, for
commands initiating I/O operations, it
designates the storage area associated
with the operation, the action to be
taken whenever transfer to or from the
area is completed, and other options.
The CCWs can be located at any available
location in the first 16M-byte block of
storage, and more than one can be asso­
ciated with a START I/O or START I/O FAST RELEASE.
The first CCW is fetched during the
execution of START I/O or START I/O FAST
RELEASE being executed as START I/O. When START I/O FAST RELEASE is executed
independent of the device, the first CCW may be fetched subsequent to the
execution of START I/O FAST RELEASE.
Each additional CCW in the sequence is
obtained when the operation has
progressed to the point where the addi­
tional CCW is needed. Fetching of the CCWs by the channel does not affect the
contents of the location in storage.
Except for a CCW containing the
transfer-in-channel command, the CCW has
the following format: ICmd Codel Data Address
o 8 31 Flags 101////////1 Count 32 39 48 63 The fields in the CCW are allocated for
the following purposes: Command Code: Bits 0-7 specify the performed.
Data Address: Bits 8-31
location in absolute storage.
first location referred to in
designated by the CCW. specify a
It is the
the area
Chain-Data (CD) Flag: Bit 32, when one,
specifies chaining of data. It causes
the storage area designated by the next CCW to be used with the current opera­
tion.
13-38 System/370 Principles of Operation Chain-Command (CC) Flag: Bit 33, when
one, and when the CD flag and S flag are
zeros, specifies chaining of commands.
It causes the operation specified by the
command code in the next CCW to be
initiated on normal completion of the
current operation.
Suppress-Length-Indication (SLI) Flag:
Bit 34 controls whether incorrect-length
is to be indicated to the program. When
this bit is one and the CD flag is zero,
the incorrect-length indication is
suppressed. When both the CC and SLI
flags are one and the CD flag is zero,
command chaining takes place regardless
of any incorrect-length situation.
Skip (SKIP) Flag: Bit 35, when one,
specifies suppression of the transfer of
information to storage during a read,
read backward, or sense operation.
Program-Controlled-Interruption (PCI) Flag: Bit 36, when one, causes the
channel to generate an interruption
condition when the CCW takes control of
the channel. When bit 36 is zero,
normal operation takes place.
Indirect-Data-Address (IDA) Flag: Bit
37, when one, specifies indirect data
addressing.
Suspend Flag: Bit 38, when set to
one, specifies suspension of channel­
program execution. When valid, it caus­
es channel-program execution to be
suspended prior to execution of the CCW containing the S flag. Count: Bits 48-63 specify the number of
bytes in the storage area designated by
the CCW. Bit position 39 of every CCW other than
one specifying transfer in channel must
contain zero. Otherwise, a program­
check condition is generated. When the
fi rst CCW desi gnated by the C-AW does not
contain zero in bit position 39, the I/O operation is not initiated, and the
status portion of the CSW with the
program-check indication is stored
during execution of START I/O or START I/O FAST RELEASE being executed as START I/O. Detection of this condition during
data chaining causes the I/O device to
be signaled to conclude the operation.
When the absence of these zeros is
detected during command chaining or
subsequent to the execution of START I/O FAST RELEASE, the new operation is not
initiated, and an interruption condition
is generated.
The contents of bit positions 40-47 of
the CCW are ignored. If the command
code specifies the transfer-in-channel
command, bit positions 32-63 of the CCW are ignored. For the format of the CCW containing the transfer-in-channel
command, see the section "Transfer in Channel" later in this chapter.
Previous Page Next Page