In previous releases
of SAS, the FILELOCKS system option was able to lock only SAS files.
In SAS 9.2 and later, the FILELOCKS system option is able to lock
external files as well.
The FILELOCKS system
option enables you to lock both external files and SAS files based
on global settings that you set in the FILELOCKS system option. External
file locking applies to all files that are opened.
You can use multiple
instances of the FILELOCKS option to establish different settings
for different paths. One path can be a subdirectory of another path.
In this case, the most specific matching path currently in effect
governs operating system file locking. The following example shows
how you can specify multiple instances of the FILELOCKS option in
a configuration file:
filelocks = ('/u/myuserid/temp' NONE)
filelocks = ('/tmp' CONTINUE)
When the value of the
FILELOCKS option is a set of
path and
setting,
the path must be enclosed in quotation marks. If you use FILELOCKS
on the command line, then quotation marks are not needed.
Note: To prevent data corruption,
setting FILELOCKS to NONE or CONTINUE is not recommended.