Database Reference
In-Depth Information
The following are general dataset options that can also be applied to excel files.
DROP
Excludes variables from being written or read to/from an input or output file.
FIRSTOBS
Specifies the first record read from an input Excel file.
IN
Creates a flag to indicate if a variable is from a specific input file.
KEEP
Includes variables being written or read to/from an input or output file.
RENAME
Renames variables when either reading or writing a file.
WHERE
Selects observations for input or output based upon user-defined conditions.
4.7 UNIX, LINUX, and 64-Bit Windows Connection Options
This section of the chapter is still dealing with the LIBNAME statement, but here the hardware and
software changes. We begin to focus a little more directly upon the 64-bit options and options that are not
Windows options. Also, we will look at some of the features that extend the access of the LIBNAME
statement beyond the scope of a single computer into the realm of multiple computer environments. As
was mentioned earlier, the complexities introduced by multiple bit configurations and software versions has
made the job of maintaining ease of access a considerable task. I only have enough space here to introduce
a few simple concepts about interconnecting the many systems that exist.
SAS/ACCESS Interface to PC Files comes with what I call a translator. SAS calls it the SAS PC Files
Server. This program is normally started when the computer is re-booted and runs in the background
waiting for a command from SAS to interact with a PC file. The PC Files Server connection options are
available on UNIX, Linux, and 64-bit Windows Server systems. These descriptions, when used on
computer that is not a Windows computer, may be slightly different from the option descriptions used on
32-bit PC systems that are based on Windows. When the options contain characters that are not valid in
SAS names, then the values must be enclosed in quotation marks. Environment variables and system
options may be substituted for some of these connection options. The syntax for specifying options
is OPTIONNAME=value .
NOTE: To access PC files from UNIX, Linux, and 64-bit Windows systems, an active network connection
must exist from these systems to a PC-based system. The 64-bit Windows operating system is in fact a PC-
based system. However, the Excel files are accessed via the “PCFILES” server which may be either a 32-
bit or 64-bit interface. The “PCFILES” server must be accessible, and a Windows 64-bit PC may not
require the SERVER or PORT options.
This connection can be created using a LIBNAME statement similar to the following for these systems:
LIBNAME libref pcfiles <connection-options> <libname-options>;
4.7.1 Accessing Excel files on LINUX, UNIX, and 64-Bit Windows Systems
Contact your system administrator for the correct server name and port number because these can be
changed locally. An example would look something like the following LIBNAME statements. PCFILES
is the SAS/ACCESS engine name required for accessing files on a PC or PC network from Linux, UNIX,
or a 64-bit Windows system, and must be running on the server identified in the “SERVER” option. If you
are using 64-bit SAS and the PC Files server on the same computer, the SERVER and PORT options are
not required.
LIBNAME myxls PCFILES SERVER= xxxx PORT= 8621 PATH= "c:\demo.xls"; * default port V9.2;
LIBNAME myxls PCFILES SERVER= xxxx PORT= 9621 PATH= "c:\demo.xls"; * default port V9.3;
 
Search WWH ::




Custom Search