How to: |
CHECKSUM computes a hash sum, called the checksum, of its input parameter, as a whole number in format I11. This can be used for equality search of the fields. A checksum is a hash sum used to ensure the integrity of a file after it has been transmitted from one storage device to another.
CHECKSUM(buffer)
where:
Is a data buffer whose hash index is to be calculated. It can be a set of data of different types presented as a single field, in one of the following data type formats: An, AnV, or TXn.
The following request computes a checksum hash value.
DEFINE FILE WF_RETAIL_LITE CHKSUM/I11 = (CHECKSUM(PRODUCT_CATEGORY)); END TABLE FILE WF_RETAIL_LITE PRINT CHKSUM BY PRODUCT_CATEGORY WHERE PRODUCT_CATEGORY NE LAST PRODUCT_CATEGORY ON TABLE SET PAGE NOLEAD END
The output is shown in the following image.