A SAS data view that
is accessed by using a server can be interpreted in either the server
or the client session.
The user specifies where
a SAS data view is interpreted by specifying the RMTVIEW= option in
the LIBNAME statement. When RMTVIEW= YES or the option is omitted,
a data view is interpreted in the server session. When RMTVIEW= NO,
a data view is interpreted in the client session.
For more information
about the LIBNAME statement and its options, see Remote Library Services.
Interpreting a view
consists of loading and calling the view engine to read the view's
underlying data. When a view is interpreted in the client session,
the view engine is loaded and called by the client to read and present
the underlying data and present it as a SAS data set. When a view
is interpreted in the server session, the view engine is loaded and
called by the server to read and present the underlying data.
Whether a SAS data view
is interpreted in a client or a server session, the underlying data
must be accessible to its view engine. Data accessibility is based
on whether the view was created by using a DATA step, PROC SQL, or
PROC ACCESS.
For DATA step views, “accessible”
means that any external file (or files) must be available and that
any filerefs and librefs that are stored in the view must be defined
in the SAS session in which the view is interpreted.
For PROC SQL views, “accessible”
means that all librefs that are used in the view must be predefined
in the SAS session in which the view is interpreted, or included in
the USING clause of the query that is stored in the view. This libref
can be associated with a SAS library that is accessed through a server
or a library that is stored at the client. You do not have to specify
a libref in a PROC SQL view for data sets that are in the same data
library as the view itself.
For PROC ACCESS views, “accessible”
means that the interface product and its data, as well as the
SAS/ACCESS interface view engine,
must be available to the SAS session in which the view is interpreted.
Where
SAS data views should be interpreted in a shared environment is based
on the following:
-
-
how the view's data will be used
-
specific site considerations
Is the underlying data
accessible? If the data is accessible only from one of the sessions,
the view must be interpreted there.
If the data is accessible
from the client session and the server session, then performance must
be a consideration. If interpreting the view requires the SAS session
to read a large number of rows in order to select a small subset,
having the
SAS/SHARE server
interpret the view greatly reduces the number of records that are
transmitted to the client session. This method reduces network load
and might be faster than having the client session interpret the view.
However, putting a heavy processing load on the server (especially
if joins are involved) might adversely affect server performance for
other clients.
If the view selects
most of the input rows or if the selection criteria are processed
by a DBMS server, interpreting the view in the client session is probably
preferable.