A CWW is 64 bits (8 bytes) in length. Here is the layout of the CCW
0 8 16 24 32 40 48 56
+--------+--------+--------+--------+--------+--------+--------+--------+
| CMD | Data Addr (24 bits) | FLAGS |00000000| Length |
+--------+--------+--------+--------+--------+--------+--------+--------+
Command Code (Bits 0-7) Specifies the I/O operation to be performed.
Data Address (Bits 8-31) Specifies the location in main storage for the data associated with the I/O operation.
Chain Data Flag (CD) (Bit 32) When set to one indicates the chaining of data. It causes the storage area of the next CCW to be used with the current I/O operation. The use of data chaining allows data to be transferred to or from noncontiguous areas of storage in a single I/O operation.
Command Chain (CC) (Bit 33) When set to one, and when the CD flag is set to zero, indicates the chaining of commands. When the operation of the current CCW is complete and Command Chaining is active, the next CCW will become the new current I/O operation.
Suppress Length Indication (SLI) (Bit 34) When set to one and the CD flag is set to zero, the incorrect length indication is suppressed.
Skip (SKIP) (Bit 35) When set to one the transfer of information is suppressed for read and sense operations.
Program Controlled Interrupt (PCI) (Bit 36) When set to one the channel will generate an interruption condition when the CCW begins execution in the channel.
Indirect Data Address (IDA) (Bit 37) When set to one indicates indirect addressing. The data address of the CCW points to an Indirect Address List instead of directly to the data.
Count (Bits 48-63) Specifies the number of bytes to be used for the I/O operation.
Bits 38-47 should always be set to zeros.
Flag Summary
80 - Chain Data
40 - Command Chain
20 - Suppress Incorrect Length
10 - Skip
08 - PCI
04 - Indirect Data Address
+--------+--------+--------+--------+--------+--------+--------+--------+
| | |ASCBCDUU|PIPPCCIC| |
|KKKK0LCC| Last CSW Addr + 8 |TMUSEECE|CLCEDCCC| Residual Length |
| | | EY |I CCC | |
+--------+--------+--------+--------+--------+--------+--------+--------+
Protection Key (Bits 0-3) indicates the protection key used for the I/O operation.
Logout Pending (L) (Bit 5) When set to one it indicates that an I/O instruction cannot be executed until a pending logout condition has been cleared.
Deferred Condition Code (CC) (Bits 6-7) Indicate a different condition code available for a Start I/O Fast Release after a condition code of zero was returned.
CCW Address (Bits 8-31) Indicate an address eight bytes greater than the last CCW used.
Status (Bits 32-47) These bits identify the condition that caused the CSW to be stored.
- 32 Attention – The device has detected an asynchronous condition significant to the program
- 33 Status Modifier – Indicates the device cannot provide its current status in response to a TEST I/O, when the control unit is busy, when the normal sequence of commands has to be modified or when command retry is to be initiated.
- 34 Control Unit End – Indicates the control unit has become available for use for another operation.
- 35 Busy – Indicates the I/O device cannot execute the command because it is executing a previously initiated operation or because there is a pending interrupt condition.
- 36 Channel End – Indicates completion of the portion of an I/O operation involving the transfer of data or control information between the I/O device and the channel. When command chaining is used Channel End is generated only for the last operation.
- 37 Device End – Indicates the completion of an I/O operation by the device. When command chaining is used only the Device End condition for the last operation in the chain is reported.
- 38 Unit Check – Indicates the I/O device or control unit has detected an unusual condition and additional detail information is available to a sense command.
- 39 Unit Exception – Indicates a condition reported by an I/O device that does not usually occur.
- 40 Program Controlled Interruption – This condition is generated when a channel fetches a CCW with the PCI flag set.
- 41 Incorrect Length – Indicates the number of bytes in storage assigned to the I/O operation is not equal to the number of bytes requested by the device.
- 42 Program Check – Indicates a programming error in the channel program. Can occur as a result of an invalid address in the CAW or a TIC CCW, an invalid command code, an invalid count in a CCW, an invalid data address, an invalid CAW format, an invalid CCW format or an invalid sequence of CCWs.
- 43 Protection Exception – Indicates the channel attempted to access storage that is prohibited by storage protection.
- 44 Channel Data Check – Indicates a machine error has occurred causing a parity error.
- 45 Channel Control Check – Indicates a machine error.
- 46 Interface Control Check – Indicates an invalid signal occurred on the I/O interface.
- 47 Chaining Check – Indicates a channel overrun during data chaining operations.
Count (Bits 48-63) Contain the residual count for the last CCW.
Flag Summary
80 00 - Attention
40 00 - Status Modifier
20 00 - Control Unit End
10 00 - Busy
08 00 - Channel End
04 00 - Device End
02 00 - Unit Check (Sense Available)
01 00 - Unit Exception (DASD EOF)
00 80 - PCI
00 40 - Incorrect Length
00 20 - Program Check
00 10 - Protection Exception
00 08 - Channel Data Check
00 04 - Channel Control Check
00 02 - Interface Control Check
00 01 - Chaining Check
Please let me know the location of timestamp
For a block of data in ckd format.
Where do the operating system writes “timestamp”
For a block of data on a disk track?
There is no timestamp unless it is part of the data. The CKD format is how the data is physically maintained on the DASD device. The CDK format tells you how the data is stored on the disk drive. It is up to the application programmer to determine what is contained in the data.
MVS does have a type of a file system but it is a bit different from how file systems are implemented on Linux, Unix, Windows, etc. For MVS the file system is maintained by the VTOC (Volume Table of Contents). Basically it keeps up with what tracks on the disk belong to which data sets. There is some meta-data in the VTOC. The VTOC is made of of DSCB blocks. The DSCB Format 4 contains information about a specific data set. There is some date information maintained in the DSCB. For MVS 3.8 I don’t remember exactly what date information is maintained.