CCW and CCW0 instructions

The CCW and CCW0 instructions define and generate an 8-byte, format-0 channel command word for input/output operations. A format-0 channel command word allows a 24-bit data address. The CCW and CCW0 instructions have identical functions. If a control section has not been established, CCW and CCW0 will initiate an unnamed (private) control section.

Read syntax diagramSkip visual syntax diagram>>-+--------+--+-CCW--+----------------------------------------->
   '-symbol-'  '-CCW0-'  
 
>--command_code,data_address,flags,data_count------------------><
 
symbol
is one of the following:
command_code
is an absolute expression that specifies the command code. This expression's value is right-justified 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-justified in bytes 1 to 3 of the generated channel command word.
flags
is an absolute expression that specifies the flags for bits 32 to 37, and zeros for bits 38 and 39, of the generated channel command word. The value of this expression is right-justified 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-justified 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 13.

Table 13. Channel command word, format 0
Byte Bits Usage
0 0-7 Command code
1-3 8-31 Address of data to operate upon
4 32-37 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.

The following are examples of CCW and CCW0 statements:

WRITE1   CCW             1,DATADR,X'48',X'50'
WRITE2   CCW0            1,DATADR,X'48',X'50'

The object code generated (in hexadecimal) for either of the above examples is:

01 xxxxxx 48 00 0050

where xxxxxx contains the address of DATADR, and DATADR must reside below 16 megabytes.

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.

End of z/OS

Specifying RMODE: Use RMODE 24 with CCW or CCW0 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.


[ Top of Page | Previous Page | Next Page | Contents | Index ]