Text
Set Text Exclusive [ On | Off ]
(Initial: OFF)
When you text in a file, Qedit creates a workfile and copies the contents of the original file into it. The original file is then closed. This means that other users on the system can text in the file and make changes of their own. This is great for concurrency but not so great for version control.
The Set Text Exclusive option provides increased control over files that you are editing. To enable, simply enter:
/Set Text Exclusive On
When this option is enabled, files that you text in are kept open for read-only access. This means the files are still accessible to compilers and other programs with non-conflicting access including Qedit with Set Text Exclusive disabled. In the latter case, a user will be able to text the file in but will not be able to save changes with a Keep command.
Once Set Text Exclusive is enabled for all users and a particular file is being worked on, subsequent Text commands immediately fail with:
Error: EXCLUSIVE VIOLATION: FILE BEING ACCESSED (FSERR 90)
On a system where Qedit is the editor of choice, we recommend that Set Text Exclusive be inserted in one of the system Qeditmgr files (qeditmgr.pub.sys or qeditmgr.pub.robelle).
Once a file has been texted in, the user retains control over it. The file is released when:
- another file is texted in
- the workfile is closed explicitly by a Shut command or implicitly by a New or Open command
- the workfile is purged e.g. purge *
- Qedit is terminated
All these operations signal Qedit that the work is done on this file. When the workfile is shut (explicitly or implicitly), Qedit tries to clear its contents. If the file is clean i.e. has not been modified, the file is erased. If the file has been modified, Qedit prompts for a confirmation:
/shut Reminder: you have not saved the changes to SHRFILE.\SRC.\DEVACCT QED73068.SRC.DEVACCT,OLD Qedit File, # of lines=13 Clear file [no]?
If you answer No, nothing happens. The workfile remains open, the original file is still in use and a warning is displayed.
File NOT cleared Files still open. When Text Exclusive is On, workfile must be cleared to Shut.
If you answer Yes, the workfile is cleared and the original file is released. This accomplishes three things:
- releases the file so it can be used by someone else and does not remain blocked
- forces the user to stop and decide what should be done with the changes
- forces the user to text the file in again to make sure he has the latest version