SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Accessing Other Vendors' DBMS Data
DBMS Access Using the SQL Procedure Pass-Through Facility


DISCONNECT Statement

Finally, to end the connection to the DBMS, use the DISCONNECT statement.


General form, DISCONNECT statement:
DISCONNECT FROM dbms-name | alias;

where dbms-name | alias identifies the database management system or its alias.

Note: If you omit the DISCONNECT statement, an implicit DISCONNECT is performed when PROC SQL terminates.


Example

In the PROC SQL step below, the DISCONNECT statement ends the connection to the DB2 database that has the alias Dbshare and terminates the SQL procedure.

     proc sql;
        connect to db2 as dbshare (ssid=db2a);
        ...
        disconnect from dbshare;
     quit;

back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement