Channel Command Words (CCWs) are the fundamental building blocks used in IBM Z I/O architecture to describe exactly what an I/O device should do.
They are part of a channel program, which is executed by the channel subsystem independently of the CPU.
What a CCW does (core idea)
A CCW is an instruction for I/O devices, not for the CPU.
It tells the channel subsystem things like:
-
Read data
-
Write data
-
Search for a record
-
Control device behavior
-
Transfer data between memory and device
👉 Think of CCWs as:
“micro-instructions for storage and I/O devices”
Where CCWs sit in the I/O flow
-
Application issues I/O (e.g., read a dataset)
-
z/OS builds an I/O request block
-
Channel subsystem receives a channel program
-
Channel program = sequence of CCWs
-
CCWs are executed by the channel hardware
-
Device performs operations without CPU intervention
Structure of a CCW
Each CCW typically contains:
1. Command code
Defines the operation:
-
READ
-
WRITE
-
SEEK
-
CONTROL
-
SENSE
2. Data address
Memory location involved in transfer
3. Byte count
How much data to transfer
4. Flags
Control behavior such as:
-
Chain commands
-
Skip data transfer
-
Suppress length checks
-
Indicate end of chain
Types of CCW chaining (important concept)
CCWs can be linked into sequences:
1. Command chaining
-
Multiple commands executed as one logical operation
-
No interruption between steps
2. Data chaining
-
Transfers data across multiple memory blocks
-
Useful for large I/O buffers
3. Transfer-in-channel (TIC)
-
Conditional branching inside channel program
-
Enables loops and decision logic
Why CCWs are powerful
1. Offload CPU completely
Once started:
-
CPU is free
-
Channel subsystem runs independently
2. High parallelism
Multiple CCW programs run concurrently across channels
3. Very low overhead
No per-block CPU involvement
4. Deterministic execution
Same CCW sequence always produces same I/O behavior
Example (simplified CCW flow)
A disk read might look like:
-
SEEK to track
-
READ data block into memory
-
VERIFY checksum
-
END
Each step = one CCW
Role in modern IBM Z (still critical)
Even in modern FICON/zHPF environments:
-
CCWs still define logical I/O operations
-
They are translated into optimized hardware commands
-
zHPF reduces overhead but still uses CCW semantics
Key takeaway
CCWs are the instruction set of the IBM Z I/O channel subsystem, enabling fully offloaded, highly parallel, and hardware-driven I/O execution.