Control Data Source Processing with a SAS System Option and a LIBNAME Statement Option

Details

SAS System options are instructions that affect your SAS session. They control how operations are performed. The availability and behavior of system options depend on the data source. Only a subset of the system options that are provided by SAS are supported for the FEDSVR engine. In addition, the FEDSVR engine supports several LIBNAME statement options that control data source processing. Like SAS system options, the LIBNAME statement options that you can submit depend on the data source.
This example shows how to control the rules for valid SAS column names by using a SAS system option along with a LIBNAME statement option.

Program

options validvarname=any; 1

libname mylib fedsvr 2
   server="d1234.us.company.com" port=2171 user="myid" pwd="mypwd" 3
   dsn=BaseDSN 4
   preserve_col_names=yes 5;

proc sql dquote=ansi;
   create table mylib.mytable ("my$column" int);

Program Description

  1. The OPTIONS statement includes the VALIDVARNAME=ANY system option, which specifies that SAS column names can be up to 32 characters in length, can begin with or contain any characters, including blanks, and can contain mixed-case letters.
  2. The LIBNAME statement assigns the libref MYLIB and specifies the FEDSVR engine.
  3. The LIBNAME statement server connection arguments specify how to connect to the DataFlux Federation Server.
  4. The data source connection arguments reference a DataFlux DSN, which provides the information to access a SAS data set.
  5. The PRESERVE_COL_NAMES=YES option controls the column names by preserving blank spaces, special characters, and mixed case when a table is created. Because the VALIDVARNAME=ANY system option is specified, the PRESERVE_COL_NAMES=YES LIBNAME statement option is required.
  6. The SQL procedure creates a table with a column named my$column.