REMOTE_DBTYPE= LIBNAME Option

Specifies whether the libref points to a database server on z/OS or to one on Linux, UNIX, or Windows.
Valid in: SAS/ACCESS LIBNAME statement
Default: ZOS
Restriction: This option is ignored if you do not use is with either the SERVER= CONNECT statement option or the LOCATION= LIBNAME option.
Requirement: Use this option with the SERVER= CONNECT statement option or the LOCATION= LIBNAME option.
Data source: DB2 under z/OS
See: LOCATION= LIBNAME option, SERVER= CONNECT statement option (SQL Pass-Through Facility Specifics for DB2 under z/OS - Key Information)

Syntax

REMOTE_DBTYPE=LUW | ZOS

Syntax Description

LUW
specifies that the database server that is accessed through the libref resides on Linux, UNIX, or Windows (LUW).
ZOS
specifies that the database server that is accessed through the libref resides on z/OS.

Details

Specifying REMOTE_DBTYPE= in the LIBNAME statement ensures that the SQL that some SAS procedures use to access the DB2 catalog tables is generated properly and is based on the database server type. It also lets such special catalog calls as DBMS::Indexes function properly when the target database does not reside on a mainframe computer.
If the target data source is a DB2 LUW or another DB2 database on z/OS, the SQL dictionary is loaded when you specify this option.

Example

This example uses REMOTE_DBTYPE= with the SERVER= option.
libname mylib db2 ssid=db2a server=db2_udb remote_dbtype=luw;
proc datasets lib=mylib;
quit;
By specifying REMOTE_DBTYPE=LUW, this SAS code lets the catalog call work properly for this remote connection.
proc sql;
	connect to db2 (ssid=db2a server=db2_udb remote_dbtype=luw);
	select * from connection to db2
	select * from connection to db2
      (DBMS::PrimaryKeys ("", "JOSMITH", ""));
quit;