CCW and CCW0 instructions
- symbol
- Is one of the following:
- An ordinary symbol
- A variable symbol that has been assigned a character string with a value that is valid for an ordinary symbol
- A sequence symbol
- command_code
- Is an absolute expression that specifies the command code. This expression's value is right-aligned in byte 0 of the generated channel command word.
- data_address
- Is a relocatable or absolute expression that specifies the address of the data to operate upon. This value is treated as a 3 byte, A-type address constant. The value of this expression is right-aligned in bytes 1 to 3 of the generated channel command word.
- flags
- Is an absolute expression that specifies the flags for bits 32 to 39, and is right-aligned, of the generated channel command word. The value of this expression is right-aligned in byte 4 of the generated channel command word. Byte 5 is set to zero by the assembler.
- data_count
- Is an absolute expression that specifies the byte count or length of data. The value of this expression is right-aligned in bytes 6 and 7 of the generated channel command word.
The generated channel command word is aligned at a doubleword boundary. Any skipped bytes are set to zero.
The internal machine format of a channel command word is shown in Table 1.
Byte | Bits | Usage |
---|---|---|
0 | 0-7 | Command code |
1-3 | 8-31 | Address of data to operate upon |
4 | 32-39 | Flags |
38-39 | Must be specified as zeros | |
5 | 40-47 | Set to zeros by assembler |
6-7 | 48-63 | Byte count or length of data |
If symbol is an ordinary symbol or a variable symbol that has been assigned an ordinary symbol, the ordinary symbol is assigned the value of the address of the first byte of the generated channel command word. The length attribute value of the symbol is 8.
LocRcd CCW X'47',LocData,X'48',L'LocData Locate record
CCW0 X'06',MyData,X'40',MyBlkSize Read Data
CCW0 X'06',MyData+MyBlkSize,0,80 Read Data
LocData DC XL16'0' Locate Record data, set at run time
- z/OS®
- Using EXCP or EXCPVR access methods: If you use the EXCP or EXCPVR access method, you must use CCW or CCW0, because EXCP and EXCPVR do not support 31-bit data addresses in channel command words.
Specifying RMODE: Use RMODE 24 with CCW or CCW0 if you wish to ensure that valid data addresses are generated. If you use RMODE ANY with CCW or CCW0, an invalid data address in the channel command word can result at execution time. If your program has an RMODE value other than 24, you might choose to code 0 or an absolute expression for the data addresses. When your program runs, it can copy the channel program to 24-bit storage for execution and set or relocate the address fields.