A SERVICE OF

logo

82 CURSOR_TYPE= LIBNAME Option Chapter 9
all of the participating librefs are created by LIBNAME statements that specify
the same value for CONNECTION_GROUP=
all of the participating librefs are created by LIBNAME statements that specify
identical DBMS connection options.
To share a connection for
all operations against multiple librefs, specify
CONNECTION= GLOBAL on all participating LIBNAME statements. Not all
SAS/ACCESS interfaces support CONNECTION=GLOBAL.
Note: If you specify CONNECTION=GLOBAL or CONNECTION=GLOBALREAD,
operations against multiple librefs can share a connection even if you omit
CONNECTION_GROUP=.
Example
In the following example, the MYDBLIB libref shares a connection with MYDBLIB2
by specifying CONNECTION_GROUP=MYGROUP and by specifying identical
connection options. The libref, MYDBLIB3, makes a second connection to another
connection group called ABC. The first connection is used to print the data from
MYDBLIB.TAB, and a third connection is made for updating MYDBLIB.TAB. The third
connection is closed at the end of the step. Note that the first connection is closed by
the final LIBNAME statement for that connection. Similarly, the second connection is
closed by the final LIBNAME statement for that connection.
libname mydblib oracle user=testuser /* connection 1 */
pw=testpass
connection_group=mygroup;
libname mydblib2 oracle user=testuser
pw=testpass
connection_group=mygroup;
libname mydblib3 oracle user=testuser /* connection 2 */
pw=testpass
connection_group=abc;
proc print data=mydblib.tab ...
proc sql; /* connection 3 */
update mydblib.tab ...
libname mydblib clear; /* does not close connection 1*/
libname mydblib2 clear; /* closes connection 1 */
libname mydblib3 clear; /* closes connection 2 */
CURSOR_TYPE= LIBNAME Option
Specifies the cursor type for read-only and updatable cursors
Valid in: the SAS/ACCESS LIBNAME statement
DBMS support: DB2 UNIX/PC, ODBC, OLE DB, Microsoft SQL Server
Default value: DBMS-specific