Chapter Contents

Previous

Next
Moving and Accessing SAS Files across Operating Environments

Accessing Version 6 Files or Version 8 Files in a Mixed Library

Note:    All Version 8 hosts, except the OS/390 host, support mixed libraries. For a list of Version 8 hosts, see Host Types Supported According to SAS Release.  [cautionend]

You are advised to create version-specific SAS files in version-specific libraries. Such an organization enables you to work on the entire contents of a library in a predictable way. Otherwise, without segregation of files by version, mixed libraries result. A disadvantage of a mixed library is that your access to its members may be limited to files that were created in one version or the other without your awareness. For reasons to convert a Version 6 file to Version 8 format or to access Version 6 and Version 8 files in a mixed library, see Deciding Whether to Convert the Copied File.

Your ability to access a specific file in a library depends on the engine that you associated with the library in the LIBNAME statement. You can use the RENGINE= option in the LIBNAME statement to explicitly invoke the appropriate engine, or you can omit the engine from the LIBNAME statement so that the SAS/SHARE server can determine the appropriate engine to invoke.

Here are examples:

Note:   A Version 8 server is assumed in these examples.   [cautionend]

libname grades 'SAS-data-library' server=shr1 rengine=V6;
libname grades 'SAS-data-library' server=shr1 rengine=V8;
libname grades 'SAS-data-library' server=shr1;

In the first two examples, you explicitly assign to the server library the files that were created in either version. When you specify RENGINE=V6 , the server accesses only files that were created in Version 6. Likewise, when you specify RENGINE=V8, the server accesses only files that were created in Version 8 and Version 7.

Note:   Because the Version 7 and Version 8 file formats are identical, the V8 engine will detect both Version 8 and Version 7 files. Likewise, the V7 engine will locate both Version 7 and Version 8 files.  [cautionend]

The advantage of specifying the RENGINE= option is that it overrides the server default, and it reduces search time that is normally required by a server when determining the appropriate engine to invoke. Ordinarily, this option should not be specified because the server determines which engine to use to process the data library.

In the third example, because no 8 server detects a mix of files that have type Version 6 and Version8 formats, then it uses the default V8 engine to access Version 8 (and Version 7) files and it ignores Version 6 files. If the server detects only Version 6 files (names are appended with Version 6 extensions), the server uses the Version 6 engine for file access. Likewise, if it detects only Version 8 (or Version 7) files (names are appended with Version 8 extensions), the server uses the V8 engine for file access.

For example, for a server that is located on an HP-UX UNIX host, the V6 engine permits server access only to data sets whose name extension is .ssd01. As another example, for a server on an OpenVMS host, the V8 engine permits server access to data sets whose name extension is .sas7bdat. For a complete list of filename extensions by host and by release, see SAS Filename Extensions and File Headers.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.