HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


CCW and CCW0 instructions

HLASM Language Reference
SC26-4940-06

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 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:
  • 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.

Table 1. 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-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.

Here is an example of a channel program:
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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014