Consultor Eletrônico



Kbase 12012: CRC: Overview of Cyclic Redundancy Check as of 6/1/93.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
CRC: Overview of Cyclic Redundancy Check as of 6/1/93.

This notebook entry describes CRC usage and where to find
additional information about CRC.

What is CRC?
CRC stands for Cyclic Redundancy Check. It originated in asyncronical
communication: <SM><MSG><CRC><EM>. <SM> is Start of Message, <MSG> the
message itself, <CRC> is normally the XOR sum of <SM> and <MSG>, and
<EM> is End of Message. The <CRC> is like a FINGERPRINT of a given
message and is used to detect corrupt messages.

Why CRC in Progress?
A way to insure integrity between database schema and compiled code
is to store a CRC code in the compiled code, as PROGRESS does.
If the CRC code changes, there has been a change in the schema,
and a new compilation is required.

When was CRC introduced?
CRC was introduced in Version 6.2F and later. Before 6.2F, PROGRESS
stored the Timestamp (for example, when the last Dictionary change
was made) in the compiled code. However, not all the information
in the Data Dictionary has an effect on already compiled code and
the Timestamp information was inappropriate.

What will change the CRC?
The following actions change the CRC for a database file:
* Delete the database file.
* Change the file name.
* Change the database language.
* Add or delete a field.
* Change the name or order of a field.
* Add or delete an index.
* Modify and index.

Example of CRC.
1> Make a copy of the demo database.
2> Type in the following short program:
FOR EACH _FILE:
DISPLAY _FILE-NAME _CRC.
END.

In version 6.2L on a Sun4 machine, the AGEDAR has a CRC of 25867.

3> Add a field called XCRC with character data type. The CRC changes
22212. (If you used integer data type, the CRC would change to
41263.)
4> If you try to run any compiled code (for the original AGEDAR with
CRC 25867) on the new file, PROGRESS generates the following error
message.

Database is not consistent with <procedure>--try recompiling. (482)

Bugs concerning CRC:
* CRC does not apply to workfiles.
* Frame-field & Frame-file.

For more information on CRC, see the following documentation:
* Notebook 214: CRC: Impact of deleting index.
* Notebook 9393: Outstanding CRC issues (as of 2/10/92).
* Notebook 11428: How CRC is calculated in Version 7.
* Version 6 Documentation Bulletin VIII: FEAT 20-23.
* Version 6 Technical Bulletin Volume 6, Edition 12: Page 10-11 or
* Version 6 Technical Bulletin Volume 6, Edition 14: Page 7-8.

Progress Software Technical Support Note # 12012