Previous Page | Next Page

Using SAS Files

Accessing Files in Concatenated SAS Libraries under OpenVMS


Order in Which Concatenated Directories Are Accessed

SAS uses a set of rules to determine the order in which concatenated directories are accessed. The rules differ depending on whether you are opening a SAS file for input, update, or output:


Accessing Data Sets That Have the Same Name

If you create a new SAS data set from a data set that has the same name, the DATA statement uses the output rules and the SET statement uses the input rules. In this example, the SPECIES data set originally exists only in the second directory, MYDISK:[MYDIR].

x 'define mysearch sys$disk:[sas],mydisk:[mydir]';
libname test 'mysearch';
data test.species;
   set test.species;
   if value1='y' then
      value2=3;
run;

The DATA statement opens SPECIES for output based on the output rules, which indicate that SAS opens a data set in the first of the concatenated directories (SYS$DISK:[SAS]).

The SET statement opens the existing SPECIES data set in the second directory(MYDISK:[MYDIR]), based on the input rules. Therefore, the original SPECIES data set is not updated. After the DATA step is processed, two SPECIES data sets exist, one in each directory.

Previous Page | Next Page | Top of Page