specifies the parameters
that are used to invoke SAS. The default values are initialization
statement (-initstmt
), which executes a SAS
macro (%SASODBC
), which invokes the SAS ODBC
server. The __5001
value is only an example.
It is a SAS macro parameter whose value is taken from the name that
you specified in the Name field of the Servers tab. The value can be either a service name,
such as srv1
, or it can be a port number
prefixed with two underscores, such as __5001
. The value cannot be just a port number, such as 5001
. The -icon
option specifies that the SAS
ODBC server should be invoked as a minimized SAS session because no
interaction with the server is required. The -nosplash
option (not shown) specifies that the SAS session is invoked without
displaying the SAS logo and copyright information.
The
%SASODBC
macro is provided with SAS and is found in
!SASROOT\core\sasmacros\sasodbc.sas
. The sasodbc.sas file
executes PROC ODBCSERV.
The sasodbc.sas file
can be modified to add SAS options or SAS statements, such as the
LIBNAME statements mentioned in
Defining Libraries at Server Start-Up Time. In addition, you can add options to PROC ODBCSERV. The
available options are the same as those for PROC SERVER. For more
information, see
SAS/SHARE User's Guide.
An additional option,
LOG=QUERY
, is relevant for servers that are used
by the driver. This option causes the server to log SQL queries. (By
default, the server logs update and output operations, but not queries.)
This option is useful when you need to see the queries that the server
receives from an ODBC client application.
If your SAS session
is installed on a network drive and is shared by multiple users, then
you probably do not want individual users to modify the sasodbc.sas
file. Instead, a user can make a copy of the file and store it in
a personal library. In this case, the user must add the
-sasautos
option either to the
Startup Parameters field or to the local config.sas file to indicate the pathname for
the library, as in the following example:
-sasautos c:\programs\sas
For more information
about SAS system options and SAS statements, see
SAS Companion for Windows.