The CHECKSUM option is used to detect I/O errors. A checksum is a value computed for each block by applying an equivalence operator to each word in the block. When the block is physically written, the checksum value is stored in a checksum word appended to the end of the block. When the block is read, the checksum is recomputed and the result is compared to the stored value.
A checksum error occurs if the two values are not equal. When an error occurs, the user program is notified of the error and the READLOCK bit for the row in error is turned on.
For databases not using the XE features, if the CHECKSUM option is not specified (either in the Defaults section or at the structure level), the CHECKSUM option is FALSE by default. Specifying CHECKSUM or CHECKSUM = TRUE sets the option. The recommended setting is TRUE.
![]() |
For databases using the XE features, the CHECKSUM option is required for all structures that use the EXTENDED attribute. |
If the CHECKSUM option is not specified (either in the Defaults section or at the structure level), then
-
The CHECKSUM option is set to TRUE by default for all new structures regardless of whether the EXTENDED attribute is set.
-
All existing structures retain their CHECKSUM settings.
For existing structures that add the EXTENDED attribute, a record format reorganization is required to add
-
A CHECKSUM word (if CHECKSUM is not specified or if it is being changed from FALSE to TRUE)
-
The required Transtamp and Record Serial Number (RSN) fields for data sets
-
The required Transtamp field for the global data set
The global CHECKSUM default can be overridden in either the global data set and set Defaults section, or at the structure level for data sets and their associated sets.
If the CHECKSUM option is not specified at the structure level, the option is FALSE for new structures if the EXTENDED attribute for the structure is FALSE and
-
The global database default CHECKSUM option is explicitly set to FALSE, and CHECKSUM is not specified either in the global data set or set-subset defaults or at the structure level.
-
The CHECKSUM option is explicitly set to FALSE at the global data set or set-subset level, and CHECKSUM is not specified at the structure level.
-
The CHECKSUM option is explicitly set to FALSE at the structure level.
More global specifications of the CHECKSUM option are still in effect for any new non-XE structures.
Be sure to take into account the explicit or implicit setting of the CHECKSUM option when calculating data set BLOCKSIZE and set-subset TABLESIZE specifications.