Control Data Source Processing with a LIBNAME Statement Option

Details

The FEDSVR engine supports several LIBNAME statement options that control data source processing. The options that you can submit depend on the data source. This example shows how to preserve an Oracle table name that is not a valid SAS name.

Program

libname oralib fedsvr 1
   server="d1234.us.company.com" port=2171 user="myid" pwd=mypwd 2
dsn="OracleDSN" 3 preserve_tab_names="yes" 4;

proc sql dquote=ansi; 5
   select * from oralib."My Table";

Program Description

  1. The LIBNAME statement assigns the libref OraLib and specifies the FEDSVR engine.
  2. The LIBNAME statement server connection arguments specify how to connect to SAS Federation Server.
  3. The data source connection arguments reference a DSN definition, which provides the information to access an Oracle database.
  4. The PRESERVE_TAB_NAMES=YES option controls table names by preserving blank spaces, special characters, reserved words, and mixed case. The default behavior is that SAS normalizes the DBMS table name according to SAS naming conventions.
  5. The SQL procedure reads the table name from the data source as My Table.