Enterprise Communication Interface (ECI)

eci_epq_sfp

Description

This function calls stored procedures or functions via ECI.
 

Input parameter

cpEpqFunc

string {epq_sp|epq_fp} EPQ function to call. epq_sp: stored procedure epq_fp: stored function

cpName

string name of stored procedure or function

cpNumPar

string number of input and output parameter of stored procedure or function

cpaPar_1

stringlist First parameter in syntax: {epq_par_in|epq_par_out} - input or output parameter
epq_NOT_NULL|epq_NULL} - no NULL value or NULL value
{epq_char} - type of parameter
<value> - value of parameter ("" if EPQ_NULL or parameter is output parameter.

cpaPar_ <n>

stringlist Last parameter (with n=cpNumPar)

Output parameter

 

cpRetPar

string return code of stored function/procedure

cpOutNum

string number of output parameter of stored procedure or function

 

cpaOutPar_1

stringlist

First output parameter in syntax: {epq_NOT_NULL|epq_NULL} - no NULL value or NULL value

<value> - value of parameter ("" if epq_NULL or parameter is output parameter.

cpaOutPar_ <n>

stringlist Last output parameter (with n=cpOutNum)

Example:

eci_connect(..)
eci_cre_par(...);
eci_cre_par(...);
 
 
/* use 'stored procedure' EPQ function */
eci_add_par(tFunPar, "epq_sp"); eci_end_par(tFunPar);
 
/* number of parameter (input and output) of stored procedure */
eci_add_par(tFunPar, "4");
eci_end_par(tFunPar);

 

 
/* description and value of first parameter */
eci_add_par(tFunPar, "epq_par_in");
eci_add_par(tFunPar, "epq_NOT_NULL"); eci_add_par(tFunPar, "epq_char");
eci_add_par(tFunPar, "SML90");
eci_end_par(tFunPar);
 

/* description and value of second parameter */ eci_add_par(tFunPar, "epq_par_in");
eci_add_par(tFunPar, "epq_NOT_NULL"); eci_add_par(tFunPar, "epq_char");
eci_add_par(tFunPar, "C_45");
eci_end_par(tFunPar);

 

 

 
/* description and value of third parameter */ eci_add_par(tFunPar, "epq_par_in");
eci_add_par(tFunPar, "epq_NOT_NULL"); eci_add_par(tFunPar, "epq_char");
eci_add_par(tFunPar, "T_JHH_CMP.E='y' AND C_43='ROQ'");
eci_end_par(tFunPar);
 
   
/* description and value of last parameter */
/* for all possible output parameter here */
/* you always have the same ECI-input values */
/* */
eci_add_par(tFunPar, "epq_par_out");
eci_add_par(tFunPar, "epq_NOT_NULL");
eci_add_par(tFunPar, "epq_char");
eci_add_par(tFunPar, "");
eci_end_par(tFunPar);
 
   
eci_call(..., "eci_epq_sfp", tFunPar, ....)  
   
i=1;
eci_set_par(..., i++);
eci_get_par(..., caNumberOfOutputparameter);
 
   

while (eci_set_par(..., i++)
{

 
  eci_get_par(..., caEpqNull);
/ * if caEpqNull has value epq_NULL then the column value is NULL */
e ci_get_par(..., caValue);
 
}    
eci_close(..)