Format of the CCB

The macro sets up an area of either 16 bytes or 24 bytes.

For the layout of this area and its contents see Table 1 and the following description of the individual fields.

Table 1. Layout and Contents of the Command Control Block (CCB)
Offset (In Hex) Length (In Hex) Contents
0 2 Residual count (see Note 1).
2 2 Communication bytes (see Note 2).
4 2 CSW status bits (see Note 3).
6 2 Type code (see Note 4).
8 1 Reserved.
9 3 Address of CCW (see Note 5).
0C 1 Reserved.
0D 3 CCW address in CSW (see Note 6).
10 10 Optional sense CCW (see Note 7).
Note:
  1. After a record has been transferred, IOCS places the residual count from the CSW into bytes 0 and 1. By subtracting this count from the original count in the CCW, your program can determine the length of the transferred record.
  2. The two bytes, also known as transmission information, are used for communicating information between physical IOCS and your program. For detailed information about the use and purpose of the bits in this field, see the section CCB Communication Bytes.

    Your program can test any of the bits in this field using the mask given for each of the bits. Your program can test more than one bit by the hexadecimal sum of the test values.

    All bits are set to 0 when your program is assembled unless the X'nnnn' operand is specified. If this operand is specified, it is assembled into these two bytes. When your program is being executed, a bit can be set to 1 by your program (to request certain functions or specific feedback information) or by physical IOCS (as a result of having detected a certain condition). Any bits that can be turned on by physical IOCS during program execution are reset to zero by PIOCS the next time an EXCP macro is executed against the same CCB.

  3. Bytes 4 and 5 are set to X'00' whenever an EXCP macro is issued against the CCB. The meaning of the bits in these two bytes is as follows:
      Byte 4 Byte 5
      0 = Attention 0 = Program-controlled interruption
      1 = Status modifier 1 = Incorrect length
      2 = Control unit end 2 = Program check
      3 = Busy 3 = Protection check
      4 = Channel end 4 = Channel data check
      5 = Device end 5 = Channel control check
      6 = Unit check 6 = Interface control check
      7 = Unit exception 7 = Chaining check
  4. Contents of byte 6:
      Byte 6
      X'0u' = Original CCB
      X'4u' = BTAM-ES CCB
      X'8u' = User-translated CCB in virtual partition
      If u = 0: the address in byte 7 refers to a system logical unit.
      If u = 1: the address in byte 7 refers to a programmer logical unit.
    Contents of byte 7: Hexadecimal representation of SYSnnn:
      Byte 7  
      SYSRDR = 00 SYS000 = 00
      SYSIPT = 01 SYS001 = 01
      SYSPCH = 02 SYS002 = 02
      SYSLST = 03 .
      SYSLOG = 04 .
      SYSLNK = 05 .
      SYSRES = 06 SYS254 = FE
      SYSUSE = 09  
      SYSREC = 0A  
      SYSCAT = 0D  
  5. Bytes 9 through 11 contain the address of the CCW (or of the first of a chain of CCWs) associated with the CCB:
    • This is a real address if CCB byte 6 = X'8u'.
    • This is a virtual address if CCB byte 6 = X'0u'.
    • This is a format-1 CCW if CCB byte 12 contains X'01'
  6. Bytes 13-15 contain either of the following:

    The CCW address contained in the CSW at channel-end interrupt for the I/O operation involving the CCB; or the address of the associated channel appendage routine if CCB byte 12 contains X'40'.

  7. Bytes 16 to 23 are provided only if the sense operand was specified in the CCB macro. They accommodate the CCW for returning sense information to your program.