Execution of Input/Output Operations
The channel can execute six commands:
Read backward
Transfer in channel
Each command except transfer in channel initiates
a corresponding I/O operation. The term "I/O oper­ ation" refers to the activity initiated by a command in
the I/O device and subchannel. The subchannel is in­
volved 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 occurs. Blocking of Data
Data recorded on an external document may be di­
vided into blocks. A block of data is defined for each
type of 110 device as the amount of information rec­
orded in the interval between adjacent starting and
stopping points of the device. The length of a block
depends on the documents; for example, a block can
be a card, a line of printing, or the information rec­
orded between two consecutive gaps on 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 writing on a magnetic tape unit or on an inquiry sta­
tion, blocks are not defined, and the amount of in­
formation transferred is controlled only by the pro­
gram. Channel Address Word
The channel address word ( CAW) specifies the storage
protection key and the address of the first ccw associ­
ated with START I/O. It appears at location 72. The
channel refers to the CAW only during the execution
of START I/O. The pertinent information thereafter is
stored in the channel, and the program is free to
change the content of the CAW. Fetching of the CAW
by the channel does not affect the contents of location
The CAW has the following format: I Key I 0 () 0 0 I Command Address
o 34 78 31
The fields in the CAW are allocated for the follow­
ing purposes:
96 Protection Key: Bits 0-3 form the storage protection
key for all commands associated with START I/O. This
key is matched with a storage key whenever data are
placed in storage.
Command Address: Bits 8-31 designate the location
of the first ccw in main storage.
Bit positions 4-7 of the CAW must contain zeros.
When the protection feature is not implemented, the
protection key must be zero. The three low-order bits
of the command address must be zero to specify the
ccw on integral boundaries for double words. If any
of these restrictions is violated or if the command ad­
dress specifies a location outside the main storage of
the particular installation, START I/O causes the status
portion of the csw to be stored with the program­
check bit on. In this event, the I/O operation is not
initiated. Channel Command Word
The channel command word (ccw) specifies the com­
mand to be executed and, for commands initiating I/O operations, it designates the storage area associ­
ated with the operation and the action to be taken
whenever transfer to or from the area is completed.
The ccw' s be located anywhere in main storage,
and more than one can be associated with a START I/O. The channel refers to a ccw in main storage only
once, whereupon the pertinent information is stored
in the channel.
The first ccw is fetched during the execution of START I/O. Each additional ccw in the chain is ob­
tained when the operation has progressed to the point
where the additional ccw is needed. Fetching of the
CCw's by the channel does not affect the contents of
the location in main storage.
The ccw has the following format: I Command
. Code Data Address
o 78 Flags Count 32 36 37 3940 4748 63
The fields in the ccw are allocated for the following
Command Code: Bits 0-7 specify the operation to
he performed.
Data Address: Bits 8-31 specify the location of an
eight-bit byte in main storage. It is the first location
referred to in the area designated by the ccw.
Chain-Data Flag: Bit 32, when one, specifies chain­
ing of data. It causes the storage area designated by
the next ccw to be used with the current operation.
Whcn bit 32 is zero, the current control word is the
last one for the operation.
Chain-Command Flag: Bit 33, when one and when
the chain-data flag is off, specifics chaining of com­
mands. It causes the operation specified by the com­
mand code in the next ccw to be initiated on normal
completion of the current operation. Whcn bit 33 is
zero or when the CD flag is one, the next ccw docs not
specify a new command.
Suppress-Length-Indication Flag: Bit 34 controls
whether an incorrect length condition is to be indi­
cated to the program. When this bit is one and the CD
flag is off in the last ccw used, the incorrect-length in­
dication is suppressed. If the ccw has the cc flag on,
command chaining takes place. Absence of the SLI flag or the presence of the CD flag causes the program to
be notified of the incorrect-length condition when it
occurs. Skip Flag: Bit 35, when one, specifies suppression
of transfer of information to storage during a read,
read-backward, or sense operation. When bit 35 is
zero, normal transfer of data takes place.
Program-Controlled-Interruption Flag: Bit 36,
when one, causes the channel to generate an inter­
ruption condition upon fetching the ccw. When bit 36
is zero, normal operation takes place.
Count: Bits 48-63 specify the number of eight-bit
byte locations in the storage area designated by the
Bit positions 37-39 of every ccw other than one spe­
cifying transfer in channel must contain zeros. Viola­ tion of this restriction generates the program-check
condition. When the first ccw designated by the CAW
does not contain the required zeros, thc I/O operation
is not initiated, and the status portion of the csw with
the program-check indication is stored during execu­
tion of START I/O. Detection of this condition during
data chaining causes the I/O device to be signaled to
terminate the operation. When the absence of these
zeros is detected during command chaining, the new
operation is not initiated, and no interruption condition
is generated.
The content of bit positions 40-47 of the ccw is
ignored. Command Code The command code in the ccw specifies to the chan­
nel and the I/O device the operation to be performed.
The two low-order bits or, when these bits are 00, the four low-order bits of the command code iden­
tify the operation to the channel. The channel dis­
tinguishes among the following four operations: Output forward (write, control)
Input forward (read, sense)
Input backward (read backward)
Branching (transfer in channel)
The channel ignores the high-order bits of the com­
mand code.
Commands that initiate I/O operations (write, read,
read backward, control, and sense) cause all eight bits
of the command code to be transferred to the I/O de­
vice. In these command codcs, the high-order bit po­
sitions contain modifier bits. The modifier bits specify to the device how the command is to he executed.
They may cause, for example, the device to compare
data rcceived during a write operation with data pre­
viously recorded, and they may specify such con­
ditions as recording density and parity. For the control
command, the modifier bits may contain thc order
code specifying the control function to be performed.
The meaning of the modifier bits depends on the type
of I/O device and is specified in the SRL publication
for the device.
The command code assignment is listed in the fo]­
lowing table. The symhol x indicates that the bit po­
sition is ignored; m identifies a modifier hit. CODE X X X X 0000 MMMM 0100 x x x x 1000 MMMM 1100 MMMMMMOI MMMMMM10
Transfer in channel Read hackward \Vritc
Whenever the channel detects an invalid command
code during the initiation of a command, the pro­
gram-check condition is generated. When the first ccw
designated by the CAW contains an invalid command
code, the status portion of the csw with the program­
check indication is stored during execution of START I/O. When the invalid code is detected during com­
mand chaining, the new operation is not initiated, and
an interruption condition is generated. The command
code is ignored during -data chaining, unless it speci­
fies transfer in channel.
Definition of Storage Area
The main-storage area associated with an I/O oper­
ation is defined by ccw's. A ccw defines an area by
specifying the address of the first eight-bit hyte to be
transferred and the number of consecutive eight-bit
bytes contained in the area. The address of the first
hyte appears in the data-address field of the ccw. The
number of bytes contained in the storage area is spe­
cified in the count field.
In write, read, control, and sense operations storage
locations are used in ascending order of addresses. As
information is transferred to or from main storage, the
content of the address field is incremented, and the
content of the count field is decrementcd .. The read­
backward operation causes data to be placed in stor- Input/Output Operations 97
Previous Page Next Page