13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

122 DBCONTERM= LIBNAME Option 4 Chapter 10ExamplesIn the following example, the DBCONINIT= option causes the DBMS to apply theSET statement to every connection that uses the MYDBLIB libref.libname mydblib db2dbconinit="SET CURRENT SQLID=’myauthid’";proc sql;select * from mydblib.customers;insert into mydblib.customersvalues(’33129804’, ’VA’, ’22809’, ’USA’,’540/545-1400’, ’BENNETT SUPPLIES’, ’M. JONES’,’2199 LAUREL ST’, ’ELKTON’, ’22APR97’d);update mydblib.invoicesset amtbill = amtbill*1.10where country = ’USA’;quit;In the following example, a stored procedure is passed to DBCONINIT=.libname mydblib oracle user=testuser pass=testpassdbconinit="begin dept_test(1001,25)";end;The <strong>SAS</strong>/<strong>ACCESS</strong> engine retrieves the stored procedure and executes it.See Also“DBCONTERM= LIBNAME Option” on page 122DBCONTERM= LIBNAME OptionSpecifies a user-defined termination command to execute be<strong>for</strong>e every disconnect from the DBMSthat is within the scope of the LIBNAME statement or libref.Default value: noneValid in: <strong>SAS</strong>/<strong>ACCESS</strong> LIBNAME statementDBMS support: Aster nCluster, DB2 under UNIX and PC Hosts, DB2 under z/OS,Greenplum, HP Neoview, In<strong>for</strong>mix, Microsoft SQL Server, MySQL, Netezza, ODBC,OLE DB, Oracle, Sybase, Sybase IQ, TeradataSyntaxDBCONTERM=DBMS-user-command

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!