%SSC_EXECIO

Execute a stored procedure with I/O parameters

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
value = %SSC_EXECIO(dbchannel, stcursor, [ncount], [numvars][, type, var, arg][, ...])

value

This function returns one of the following: the return result of a stored procedure, an error code returned by the database, SSQL_NORMAL (success), or SSQL_FAILURE (failure). (Negative values are considered an error.) (i)

dbchannel

An internal database channel previously initialized using %SSC_INIT and connected by %SSC_CONNECT. (n)

stcursor

The ID number for a statement cursor. This must be within the range from 1 through the maximum number specified by the maxcur argument for %SSC_INIT call. The cursor must have been opened by %SSC_OPEN. (n)

ncount

(optional) The number of rows to execute. The default value is 1. Only Oracle and SQL Server support multirow operations. If this argument is used with a database that does not support multirow move, ncount must be set to 1. (n)

numvars

(optional) The number of host variables for sending to or receiving from the stored procedure. (The maxcol argument, as specified in %SSC_INIT, specifies the maximum value for numvars.) If you pass numvars, you must also include the type, var, and arg arguments. The number of times you include the type, var, arg series must equal the value of numvars. (n)

type

(optional) The type of the first host variable. (Required if numvars is passed.) If you pass SSQL_EXBINARY, you must also pass one of the other types and connect the two with a plus sign (+)—for example, SSQL_EXBINARY+SSQL_OUTPUT. (n)

SSQL_INPUT

Input

SSQL_OUTPUT

Output

SSQL_INOUT

Input and output

SSQL_OUTDATE

Output date field (to conform to pre-7.1 zoned conversion rules)

SSQL_EXBINARY

A binary column (instructs %SSC_EXECIO to leave the data as is; see the Discussion below)

var

(optional) The first host variable. (Required if numvars is passed.) (a, n, or String)

arg

(optional) The name of the argument in the stored procedure. (Required if numvars is passed.) (a)

%SSC_EXECIO executes stored procedures that use input/output parameters. It does not does not accept a result set. For more information on using stored procedures with SQL Connection, see Running stored procedures from SQL Connection.

Note the following:

The Connectivity Series distribution includes example programs (in the connect\synsqlx directory) that use %SSC_EXECIO with stored procedures: