Try OpenEdge Now
skip to main content
Managing ABL Applications
Deployment Considerations : Deployment Topics and Tasks : Encrypting source code procedures : Compilation
 
Compilation
If you distribute encrypted source code, you must also prepare and distribute a program that compiles your application procedures at a user site. The core of this program is one or more COMPILE statements with the XCODE option. If you encrypt your procedures using the default key, the XCODE option is unnecessary because the Compiler recognizes that the procedures are encrypted.
The XCODE option of the COMPILE statement compiles the specified source files, and any encrypted include files, using the same keys supplied in the XCODE option.
Alternatively, you can specify a key at the session level. The XCODE-SESSION-KEY attribute of the SECURITY-POLICY handle, when set, overrides the default key but does not override the XCODE option on a COMPILE statement.
When started with the Encrypted Compiler (-rx) startup parameter, OpenEdge places you (or a user) by default in the Procedure Editor. The COMPILE statement and the icompile.p procedure will only compile encrypted procedures when OpenEdge is started with -rx. When shipping encrypted source code, you must supply either an encrypted .p or a .r version of your compile program, which can be run in encrypted compiler mode. The OpenEdge installation includes a sample template, called upgrade, that invokes OpenEdge with the -rx parameter and compiles encrypted source programs.
You invoke the encrypted source code compiler with the command PROGRESS/XCOMPILER. See upgrade.com in the Toolkit samples subdirectory for more information.
After the procedures are compiled, you might want users to delete the source to regain the disk space. If you do this, consider freezing the database files; otherwise, the user can modify the database and invalidate object procedures for which the user no longer has the source.