Syntax for the Pass-Through Facility for PCFILES

Queries data from a data source.

Syntax

PROC SQL option(s)
CONNECT TO data-source-name AS alias
( CONNECT statement-arguments
DATABASE connection-arguments )
DISCONNECT FROM data-source-name
EXECUTE data source-specific-SQL-statement BY data source-name | alias
SELECT column-list FROM CONNECTION TO data-source-name | alias (data-source-query)

Details

You can use the component with the PROC SQL SELECT statement to query data from a data source.

Return Codes

As you use the PROC SQL statements that are available in the pass-through facility, any error conditions are written to the SAS log. The pass-through facility generates return codes and messages that are available to you through the following two SAS macro variables:
SQLXRC
contains the data source return code that identifies the data source error.
SQLXMSG
contains descriptive information about the data source error that is generated by the data source.
The contents of the SQLXRC and SQLXMSG macro variables are printed in the SAS log using the %PUT macro. They are reset after each pass-through facility statement has been executed.