App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#Applicationintegration
#App Connect
#AppConnect
#Integration
#Automation
 View Only

ESQL code behaving differently for Sybase and MSSQL

  • 1.  ESQL code behaving differently for Sybase and MSSQL

    Posted 12/04/24 06:54 AM

    I am migrating my underlying database from Sybase to SQL Server. The ESQL code which was working on Sybase is not working on SQL Server.

    Basically I am trying to call a stored procedure from an ESQL function. This stored procedure returns some columns with values which I am trying to collect in a ESQL list. But this list is not able to collect the values once the stored procedure call is completed.

    Here's my code for calling a ESQL function:

    while I < n
    Declare MyList reference to Environment.XMLNSC.MyData.LIST[I];
    Create Field Enviornment.XMLNSC.MyData.LIST[I].GetParams;

    Call MyParamsFunctionESQL (MyList, Enviornment.XMLNSC.MyData.LIST[I]GetParams);

    //Here's is the definition of MyParams Funcion

    Create Procedure MyParamsFunctionESQL (In List1 Reference, In Params)
    Begin
    Declare Value1, Value2 Integer;

    Set Value1 = CAST(List1.Value1 AS Integer);
    Set Value2 = CAST(List1.Value2 AS Integer);

    //Here's the call for DB stored procedure functon
    Call MyParamsFunction(Value1, Value2, Params.GetMyParams[]) IN database.(getDNS("MyDSN")).dbo
    END;

    // Here's the definition for the stored procedure 

    Create Procedure MyParamsFunction
    (
    IN Value1 Integer;
    IN Value2 Integer;
    ) Language Database
    Dynamic Result Set 1
    External Name "dbo.MyParamsFunction"
    I am expecting that after the stored procedure call, the values returned by the stored procedure should be collected in the list GetMyParams[], but I am not getting the values in that list



    ------------------------------
    Brajesh Shukla
    ------------------------------