NOSHR: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(Created page with "NOSHR (no share) indicates that the current workstation is to have exclusive access to the file. No other opens are permitted to the same file until it has been closed. NOSHR ...")
 
No edit summary
 
Line 1: Line 1:
NOSHR (no share) indicates that the current workstation is to have exclusive access to the file. No other opens are permitted to the same file until it has been closed. NOSHR is the default when a "share spec" is not specified.
NOSHR (no share) indicates that the current workstation is has exclusive access to the file. No other opens are permitted to the same file until it has been closed. NOSHR is the default when a "share spec" is not specified.
 
NOSHR should be used to prevent others from accessing a file while a [[program]] is doing a batch update, purging a file of unwanted records, or using a temporary work file.
 
See [[File Name Locking]] for information on the [[PROTECT]] command and the [[OPEN]] statement's [[RESERVE]] parameter; these two instructions can prevent access to a NOSHR file while it is in transition from one program or command to another.
 
Since NOSHR is the OPEN statement default, neglecting to specify share-spec parameters in your programs may unnecessarily limit file accessibility when the programs are installed on a multi-user system. You can easily save a great deal of future time and tedium by specifying the appropriate file-sharing standards in all your programs, even if they are currently being designed for single-user systems only.
 
See [[Record Locking]] for more information.
 
<noinclude>
[[Category:Multi-User Programming]]
</noinclude>

Latest revision as of 17:10, 31 May 2013

NOSHR (no share) indicates that the current workstation is has exclusive access to the file. No other opens are permitted to the same file until it has been closed. NOSHR is the default when a "share spec" is not specified.

NOSHR should be used to prevent others from accessing a file while a program is doing a batch update, purging a file of unwanted records, or using a temporary work file.

See File Name Locking for information on the PROTECT command and the OPEN statement's RESERVE parameter; these two instructions can prevent access to a NOSHR file while it is in transition from one program or command to another.

Since NOSHR is the OPEN statement default, neglecting to specify share-spec parameters in your programs may unnecessarily limit file accessibility when the programs are installed on a multi-user system. You can easily save a great deal of future time and tedium by specifying the appropriate file-sharing standards in all your programs, even if they are currently being designed for single-user systems only.

See Record Locking for more information.