Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
RDBMS Stored Procedure Details : Run Stored-Procedure details : Complete syntax reference for Run Stored-Procedure
 

Complete syntax reference for Run Stored-Procedure

The following syntax shows the RUN STORED-PROC statement and all options that can be used with the statement:
RUN STORED-PROCEDURE procedure-name

[[ LOAD-RESULT-INTO handle [ int = PROC-STATUS ]] |
     [ int = PROC-HANDLE]] 
    [ NO-ERROR ]
    [ ( [INPUT | OUTPUT | INPUT OUTPUT ]
[ PARAM parameter-name = ]expression, ...
        [ INPUT | OUTPUT | INPUT OUTPUT ]
[ PARAM parameter-name = ] expression ) ]
However, keep in mind that not all options shown can be used simultaneously.
Note: In the RUN STORED-PROCEDURE syntax, note that the handle is either a pure handle or a handle that points to a temp-table. For more information about the use of temp-table handle with the LOAD-RESULT-INTO phrase, see LOAD-RESULT-INTO phrase.
CLOSE STORED-PROCEDURE procedure-name
[ integer-field = PROC-STATUS ]
[ WHERE PROC-HANDLE = integer-field ]
The CLOSE STORED-PROCEDURE is not used when the LOAD-RESULT-INTO keyword is used with the RUN-STORED-PROCEDURE statement. See Close Stored-Procedure statement.
For valid combinations and usage of these syntax elements see:
*Run Stored-Proc statement execution without the LOAD-RESULT-INTO phrase
*Run Stored-Proc statement execution with the LOAD-RESULT-INTO phrase
*Run Stored-Proc statement execution using the send-sql-statement option
The following sections describe the syntax elements and options in detail. This section also presents examples that describe typical situations in which you might use the various options that the RUN STORED-PROC statement supports.