SAS 9.1 Companion For Unix Enivronments

Sharing Files with the FILELOCKS System Option

If more than one user accesses a SAS file at the same time or if a single user has access to the same file from different SAS sessions, the results could be unpredictable. By default, the FILELOCKS system option is set to FAIL, which enables multiple SAS sessions to simultaneously read the same SAS file. (See "FILELOCKS System Option" on page 329.)

Conditions to Check When FILELOCKS=NONE

If FILELOCKS has been set to NONE, then you should do one of the following:

Sharing Files in a Network

Introduction to Sharing Files Across Workstations

SAS can be licensed to run on one or more workstations in a network of similar machines. The license specifically lists the workstations that SAS can run on. Other workstations in the network may have access to the SAS executable files but not be able to run SAS.

If the licensed workstations are connected via NFS mounts so that they share a file system, they can all share a single copy of the SAS executables, although this is not necessary. They can also share SAS files. However, if a SAS session attempts to update a data set or catalog, it must obtain an exclusive file lock on that file to prevent other sessions from accessing that file.

If SAS is installed on workstations of different types that are connected via NFS, then each type of workstation must have its own copy of the SAS executables. For information about how to move catalogs and data sets between hosts , see "Accessing SAS Files across Compatible Machine Types in UNIX Environments" on page 108.

Accessing Files on Different Types of Workstations

If the data set or catalog you want to process exists on your network but cannot be accessed with the LIBNAME statement because it resides on a different type of workstation, you have several alternatives:

Troubleshooting Accessing Data Over NFS Mounts

SAS might hang when accessing data over NFS mounts if the FILELOCKS option is set to FAIL or CONTINUE . To alleviate the problem, make sure that all NFS filelocking daemons are running on both machines (usually statd and lockd ). Your system administrator can assist with starting statd and lockd .

Note  

To test whether there is a problem with file locking, you can set the FILELOCKS system option to NONE temporarily. If setting FILELOCKS to NONE resolves the problem, then you know that there probably is a problem with the statd and lockd daemons. It is recommended that you do not set FILELOCKS to NONE permanently as it might cause data corruption or unpredictable results.

Категории