The CONNECT statement
establishes a connection with the data source. You establish a connection
to send data source-specific SQL statements to the data source or
to retrieve data source data. The connection remains in effect until
you issue a DISCONNECT statement or terminate the SQL procedure. See
DISCONNECT Statement.
To connect to a data
source using the pass-through facility, complete the following steps:
-
Initiate a PROC SQL
step.
-
Use the pass-through
facility CONNECT statement with the PC files engine name and then
assign an alias if you want.
-
Specify any arguments
needed to connect to the database.
-
Specify any attributes
for the connection.
The CONNECT statement
is optional for some data sources. However, if you do not specify
it, default values for all database connection arguments are used.
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 for more information about these macro variables.