Set read/write files

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


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


This command sets the file mode of the specified file(s) to read/write. The read/write file mode is the default type of Omnis file; you can read and write data to a read/write file. The other three file modes are read-only, closed and memory-only. If a file is changed to read/write mode when in Prepare for update, the data for the file class is reread from disk. In multi-user systems, read/write files are locked when a Prepare for... command is executed.

The file mode will revert to its former state if you use the command in a reversible block.

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


; Set the file fSequences to read/write so that we can get the next invoice number
Set read/write files {fSequences}
Set main file {fSequences}
Prepare for insert
Find first
Calculate fSequences.InvoiceNumber as fSequences.InvoiceNumber+1
Update files
Set read-only files {fSequences}