Try OpenEdge Now
skip to main content
Managing ABL Applications
R-code Features and Functions : R-code CRCs and procedure integrity

R-code CRCs and procedure integrity

When OpenEdge compiles a procedure, it calculates a special CRC based on the procedure name and code content, and stores it in the r-code. This r-code CRC (as distinguished from database CRC) is useful to ensure the integrity and security of ABL procedures, especially for schema triggers. In addition, you can use the r-code CRC to determine whether you must recompile a procedure file after a database change or between different versions of your application.
If you choose to have CRCs checked for a schema trigger, the r-code CRC of the trigger procedure definition is stored in the trigger schema. The trigger procedure cannot run unless it has a matching r-code CRC. This prevents a trigger procedure with the same name, but different ABL code, from being improperly substituted for the original trigger procedure. Such a substitution can cause damage to your database or override your security.
For other application r-code files, you can use the RCODE–INFO handle to build a procedure security table that contains the name and r-code CRC of each r-code file in your application (except the startup procedure). Before running a procedure, your application can use the RCODE–INFO handle to validate the r-code CRC of its r-code file against the entry established for it in the procedure security table.
Note: If there is no r-code for the procedure, any source (.p) procedure returns an Unknown (?) CRC value.
* Assigning CRCs to schema triggers
* Validating CRCs for schema triggers
* RCODE-INFO handle