CODELOCK (Short Name: COD)
Top  Previous  Next

Use the CODELOCK command to start CodeLock, the ASCII-to-binary conversion program that locks command and procedure files.

codelock

Options

1

Corresponds to the first menu choice in CodeLock: "Convert an ASCII command file to a binary command file."

2

Corresponds to the second menu choice in CodeLock: "Add an ASCII command file to a procedure file."

3

Corresponds to the third menu choice in CodeLock: "Add an ASCII screen file to a procedure file."

4

Corresponds to the fourth menu choice in CodeLock: "Add an ASCII menu file to a procedure file."

5

Corresponds to the fifth menu choice in CodeLock: "Convert an ASCII application file to a binary procedure file."

appfile

Specifies an ASCII application file.

apxfile

Specifies the name for the binary procedure file that is produced.

backfile

Specifies the name for the backup file.

binfile

Specifies the name for the binary command file that is produced.

cmdfile

Specifies an ASCII command file.

menufile

Specifies an ASCII menu file.

menuname

Specifies the name for the inserted menu block.

-p

Forces CodeLock to use the older encryption method (used previous to R:BASE version 4.5 Plus!). This option is necessary if the application is run using R:BASE version 4.5 or earlier.

procname

Specifies the name for the inserted command block.

screenname

Specifies the name for the inserted screen block.

scrfile

Specifies an ASCII screen file.


About the CODELOCK Command

CodeLock is an ASCII-to-binary conversion program that encodes command and procedure files, and creates an .APX file from the source file. CodeLock creates files that can only be run-not viewed or edited.

The advantages to using files encoded by CodeLock are:

·The encoded file that R:BASE creates protects the source file from being altered because the binary files produced by CodeLock cannot be changed with a text editor.  
·The run time for the encoded file might be reduced because the commands are already parsed or interpreted by CodeLock; some of the work the computer does to run the ASCII form of the command file is not necessary. Also, calls between binary blocks in procedure files can be done without opening and closing a different disk file for every call.  
·A developer can create a complex application that can be distributed in one file instead of several stand-alone files.  

In R:BASE for Windows, when MESSAGES is set off, R:BASE does not display the file that is being encoded or any system messages while the file is being encoded. When MESSAGES is set on, the application file is displayed on screen as it is encoded.

When you make additions or changes to an .APX file, the additions and changes are appended to the existing .APX file. If you make regular changes to an .APX file, you should make a new .APX file to avoid the .APX file from getting too large.

Because CodeLock is only run from within R:BASE, R:BASE uses the current QUOTES setting while encoding an application. If R:BASE encounters a SET QUOTES command while encoding an application, R:BASE will use that QUOTES setting until it encounters another SET QUOTES command, or is finished encoding the application. When R:BASE finishes encoding the application, it resets the QUOTES setting to the setting that was in effect before CodeLock began.