Usage Note 18350: Calling stored procedures using SAS/ACCESS® Interface to Oracle
You can call Oracle stored procedures several ways using SAS/ACCESS
Interface to Oracle. SAS/ACCESS Interface to Oracle cannot be
used to obtain a result set from calling a stored procedure. Stored
procedures can be called via the EXECUTE statement within the PROC SQL
Pass-Through facility. However, this will only run non-query type statements.
Therefore, result sets cannot be returned.
As a work around, another stored procedure can be created that will call
the stored procedure in question and write the result set to an Oracle
table. SAS can then access the table that was just created.
You can call stored procedures using the DBCONINIT and DBCONTERM LIBNAME
access options when executing stored procedures that do not return a
result set or output parameters. A stored procedure that might provide
additional control over the interaction between your SAS/ACCESS
interface and the dbms can be executed here during dbms
connection/disconnection. For example:
libname mydblib oracle dbconinit="execute st_pr_name('parm')";
You could also use explicit SQL using PROC SQL PASS-Through using the
EXECUTE statement to call a stored procedure that does not return a
result set or output parameters. FOr example:
proc sql;
connect to oracle (user=userid password=password path=database_name);
execute (execute st_pr_name('parm')) by oracle;
disconnect from oracle;
quit;
Operating System and Release Information
SAS System | SAS/ACCESS Interface to Oracle | Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Linux | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | |
Topic: | SAS Reference ==> Procedures ==> ACCESS
|
Date Modified: | 2008-08-28 14:06:54 |
Date Created: | 2006-08-25 11:33:37 |