Apply a SAS Data Set Option

Details

When you access a data source by using the FEDSVR engine, you can specify SAS data set options in a DATA step or SAS procedure. SAS data set options apply only to the table on which they are specified. The SAS data set options that you can use depend on the data source. Only a subset of the data set options that are provided by SAS are supported for the FEDSVR engine.
This example shows how to apply the DBCOMMIT= data set option. The DBCOMMIT= data set option causes an automatic commit (a permanent writing of data to the DBMS) after a specified number of rows have been processed.

Program

libname db2 fedsvr 1
   server="d1234.us.company.com" port=2171 user="myid" pwd=mypwd 2
   dsn=DB2DSN; 3

data db2.dept (dbcommit=10); 4
   ...
run;

Program Description

  1. The LIBNAME statement assigns the libref DB2 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 a DB2 database.
  4. The DBCOMMIT= data set option in the DATA statement causes a commit to be issued after every 10 rows are processed.