LIBNAME Statement and Pass-Through Facility for PC Files on Microsoft Windows |
Terminates the connection to the data source.
DISCONNECT FROM data-source-name | alias
|
-
data-source-name
-
specifies the data source from which you
want to disconnect. You can use an alias in the DISCONNECT statement. The
DISCONNECT statement's data source name or alias must match the name or alias
that you specified in the CONNECT statement.
-
alias
-
specifies an alias that was defined in the
CONNECT statement.
The DISCONNECT statement ends the connection
with the data source. If the DISCONNECT statement is omitted, an implicit
DISCONNECT is performed when PROC SQL terminates. The SQL procedure continues
to execute until you submit a QUIT statement, another SAS procedure, or a
DATA step.
Any return code or message that is generated by the
data source is available in the macro variables SQLXRC and SQLXMSG after the
statement executes.
See: Return Codes
Use the QUIT statement to quit the SQL procedure after
the connection and SQL processing uses the DISCONNECT statement to disconnect
the connection from the database:
DISCONNECT FROM db;
QUIT;
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.