LogiView

Function 'db_procedure'

     

This function executes the corresponding "stored procedure". A "stored procedure" is a user-defined, database-specific procedure.

If the "stored procedure" is executed successfully, 'db_procedure' will return a value of '0'. "Stored procedure" output parameters are assigned to the variables of the argument list. If the value cannot be converted to the variable type, the execution is terminated by LogiView with a corresponding error message.

If the database function is not processed correctly, 'db_procedure' returns the database-specific return value. In this case, no values are assigned to the variables of the parameter list. Nonetheless LogiView continues to process the current decision table/procedure.

The LogiView function is currently only available for the Oracle database management system. The Stored Procedure must only contain input and output parameters of type string (for example 'VARCHAR2' in Oracle). All arguments of the parameter list are automatically converted to a string by LogiView.
 

Syntax:

 

{INT_VAR}= db_procedure ({STR_EXPR}) or
{INT_VAR}= db_procedure ({STR_EXPR},{EXPR_LIST})

 

I/O parameters:

{STR_EXPR} Name of "stored procedure" to be executed
{EXPR_LIST}

List of up to 9 arguments of arbitrary type. Arguments (expressions) must be separated by colons.

Use LogiView variables if the corresponding argument of the "stored procedure" is an output parameter.

Static values (i.e. strings in inverted commas or numerical values) should be used if the corresponding argument of the "stored procedure" is an input-only parameter.

   
 
{INT_VAR} This variable either contains a zero (0) value if the database function has been executed successfully or a specific database return value.
 

Example:

  Declaration of Variables
 
10 DOCU_INT_1 = db_procedure("my_own_db_prc", "any text", DOCU_STRING_1,
                                                       DOCU_FLOAT_1)
20 if (DOCU_INT_1 == 0)
30  put (strprint("output arguments of 'my_own_db_prc' are %s und %f", 
                                DOCU_STRING_1, DOCU_FLOAT_1))
40 else
50  put (strprint("The stored procedure 'my_own_db_prc' returns
                                      error %i", DOCU_INT_1)
60 endif

Functions and commands: DB / Mask Interface