Connect to SAS Federation Server and Reference a DSN Definition

Details

This example accesses a SAS data set by specifying server connection arguments to connect to SAS Federation Server and by referencing a DSN definition with the DSN= data source connection argument. The DSN provides the information to access the data source.

Program

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

proc print data=mylib.MyTable; 4
run;

Program Description

  1. The LIBNAME statement assigns the libref MyLib and specifies the FEDSVR engine.
  2. The LIBNAME statement server connection arguments specify how to connect to SAS Federation Server. The arguments identify the computer on which the server is running, the port number that is used to access the server, and user authentication information.
  3. The DSN= connection argument references a DSN definition, which is defined on SAS Federation Server and provides the information to access the data source. The DSN definition, BaseDSN, encapsulates the SAS data set connection information, such as the BASE table driver name and the physical location of the data.
  4. The PRINT procedure specifies the name of the SAS data set that is accessed by the DSN and prints the SAS data set.