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


CCW1 instruction

HLASM Language Reference
SC26-4940-06

The CCW1 instruction defines and generates an 8 byte format-1 channel command word for input/output operations. A format-1 channel command word allows 31 bit data addresses. A format-0 channel command word generated by a CCW or CCW0 instruction allows only a 24 bit data address. If a control section has not been established, CCW1 initiates an unnamed (private) control section.
Read syntax diagramSkip visual syntax diagram
>>-+--------+--CCW1--------------------------------------------->
   '-symbol-'         

>--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 4 byte, A-type address constant. The value of this expression is right-aligned in bytes 4 to 7 of the generated channel command word.
flags
Is an absolute expression that specifies the flags for bits 8 to 15 of the generated channel command word. The value of this expression is right-aligned in byte 1 of the generated channel command word.
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 2 and 3 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 1
Byte Bits Usage
0 0-7 Command code
1 8-15 Flags
2-3 16-31 Count
4 32 Must be zero
4-7 33-63 Data address

The expression for the data address should be such that the address is 0 - 231-1, after possible relocation. This is the case if the expression refers to a location within one of the control sections that are link-edited together. An expression such as *-1000000000 yields an acceptable value only when the value of the location counter (*) is 1000000000 or higher at assembly time.

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 CCW1 statement:
A        CCW1            X'0C',BUF1,X'00',L'BUF1
The object code generated (in hexadecimal) for the above examples is:
0C 00 yyyy xxxxxxxx
where yyyy is the length of BUF1 and xxxxxxxx is the address of BUF1. BUF1 can reside anywhere in virtual storage.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014