Topic
  • 4 replies
  • Latest Post - ‏2014-07-31T16:44:54Z by GLSlone
GLSlone
GLSlone
2 Posts

Pinned topic Stored Procedure invoked from .NET

‏2014-07-29T18:01:38Z |

We have a stored procedure, created on the I-series (V7R1, but to be deployed to V6R1), that is called by a .NET program. Procedure has 1 IN parm (9A) and two OUT parms (6A and 1A). Procedure runs correctly native to I (SQL wrapped in SQLRPGLE), and its SQLRPGLE program runs correctly when invoked by Procedure or parms passed directly in. when called from .NET, the return value is blanks.

The program takes in a key value, performs calculations, and returns values in the two OUT parms. By definition, it should never return blanks.

The .NET program seems to be performing okay as well.

I was told that having Silverlight may have something to do with the parms issue between two different operating systems.

 

Any help?

Thanks

  • B.Hauser
    B.Hauser
    282 Posts

    Re: Stored Procedure invoked from .NET

    ‏2014-07-30T05:33:32Z  

    Did you check whether the library list is set correctly when calling the RPG program (wapped within the stored procedure)?

    IMHO the files/tables could either not be found and sub-sequently the data is not read and not returned.

    Birgitta

  • CRPence@vnet.ibm.com
    59 Posts

    Re: Stored Procedure invoked from .NET

    ‏2014-07-30T18:55:04Z  

    I do not recall the details, but I recall at least one interface that failed to support return values in parameters, so a circumvention was for the OUT or INOUT parameter values to be returned instead as a result-set; e.g. a row-values expression:  VALUES( pOut_Char6, pOut_Char ) ;

  • krmilligan
    krmilligan
    450 Posts

    Re: Stored Procedure invoked from .NET

    ‏2014-07-31T13:58:31Z  

    I do not recall the details, but I recall at least one interface that failed to support return values in parameters, so a circumvention was for the OUT or INOUT parameter values to be returned instead as a result-set; e.g. a row-values expression:  VALUES( pOut_Char6, pOut_Char ) ;

    Can you post the CREATE PROCEDURE statement for this stored procedure?  Did you compare with examples in the ADO.NET Redbook
    (http://ibm.com/systems/power/software/i/db2/docs/redbooks.html)?

  • GLSlone
    GLSlone
    2 Posts

    Re: Stored Procedure invoked from .NET

    ‏2014-07-31T16:44:54Z  
    • B.Hauser
    • ‏2014-07-30T05:33:32Z

    Did you check whether the library list is set correctly when calling the RPG program (wapped within the stored procedure)?

    IMHO the files/tables could either not be found and sub-sequently the data is not read and not returned.

    Birgitta

    Hey guys. Thanks for the responses. Birgitta, you were dead on it. The answer was there in plain sight. One of my embedded stored procedures was not in a library in the inherited library list of the .NET program when it came down to the Iseries. The .NET programmer led me to believe that the schema that the stored procedure was grabbing from .NET was part of the libl. It was not. Once I moved the program and stored procedure out of development and into the Q/A environment (part of the inherited LIBL), the proc and program ran perfectly.

    Going forward, I will have to wrap the RPG in a CL and be sure the LIBL is correct for the environment. 

     

    Thanks again.

    George