Set read-only files

Command group Flag affected Reversible Execute on client Platform(s)
Files YES YES NO All


Set read-only files {list-of-files (F1,F2,..,Fn)}


This command sets the file mode of the specified file(s) to read-only. You can read but not write to a read-only file. Set read-only files does not cancel the Prepare for update mode.

If you use this command in a reversible block, the file reverts to its original mode when the method containing the command block terminates.

In multi-user systems, you use Set read-only files to prevent Omnis from locking certain files. When you make files read/write, they are locked and re-read. In multi-user systems, records such as invoice numbers and totals, accessed by a number of users, should be made read-only to prevent delays caused by record locking. You must return the file to read/write status momentarily while it is updated.

In the method editor, a list of files is displayed. You can Ctrl/Cmnd-click on the file names to select multiple names.


; Data from fAccounts may be read, but not changed
Set read-only files {fAccounts}
Set main file {fInvoices}
Prepare for insert
Enter data
Update files if flag set