Get Data Moving 1
Results 1 to 2 of 2

Thread: ADO.NET & z/OS DB2 Stored Procedure

  1. #1
    JHuss is offline Junior Member
    Join Date
    Oct 2009
    Posts
    1
    Rep Power
    0

    ADO.NET & z/OS DB2 Stored Procedure

    I'm not sure if this is the right forum for this question since I'm not sure if the problem occurs in ADO.NET or on the mainframe. Anyway, here goes.

    We've written a Stored Procedure for DB2 on z/OS. The Stored Procedure is written in COBOL, and calls a handful other other COBOL programs. The Stored Procedure has 1 input parameter and 28 output parameters, all of type CHAR.

    We're attempting to call the Stored Procedure using ADO.NET from a Windows machine. We use ADO.NET on a number of other Windows servers to do standard SQL calls using the same Database and Workspace and that works fine.

    This configuration works fine when executing the Stored Procedure from DB2 Connect, but refuses to run successfully from ADO.NET. Because the Stored Procedure is running successfully from DB2 Connect, it leads me to believe that the Stored Procedure itself is probably ok. The error that we receive from DB2 when using ADO.NET is:

    [2009-10-28T09:56:02.886306]; {DB2 FOR OS/390}{ODBC DRIVER}{DSN08015}
    DSNT408I SQLCODE = -804, ERROR: AN ERROR WAS FOUND IN THE APPLICATION PROGRAM
    INPUT PARAMETERS FOR THE SQL STATEMENT, REASON 10
    DSNT418I SQLSTATE = 07002 SQLSTATE RETURN CODE
    DSNT415I SQLERRP = DSNXROUA SQL PROCEDURE DETECTING ERROR
    DSNT416I SQLERRD = 205 0 0 -1 6 0 SQL DIAGNOSTIC INFORMATION
    DSNT416I SQLERRD = X'000000CD' X'00000000' X'00000000' X'FFFFFFFF'
    X'00000006' X'00000000' SQL DIAGNOSTIC INFORMATION
    DSNT417I SQLWARN0-5 = W,W,,,, SQL WARNINGS
    DSNT417I SQLWARN6-A = ,,,, SQL WARNINGS

    REASON 10 is "Invalid data length for output variable." ADO.NET also appears to be sending back an error code of -2211, which I can't seem to find a definition for.

    To execute the stored procedure, we've tried two different methods. The first setting the CommandType to StoredProcedure, adding the parameters to the command, setting the CommandText to the procedure name and executing that way. The other is setting the CommandType to Text and sending the request in a "CALL <datasource>:<owner>.<procedurename(...)" format. Both methods return exactly the same error. We've also tried both combinations with and without PassThrough.

    If you have any suggestions on what to try, I'd sure appreciate it.

    Thanks,
    Jonathan

  2. #2
    Boaz Newman is offline Support
    Join Date
    Aug 2006
    Posts
    30
    Rep Power
    0

    ADO.NET & z/OS DB2 Stored Procedure

    Hello Jonathan

    For this type of a problem it is better to open a support issue.
    In case you don't have access to the Attunity web support system, please send an email to emea-support@attunity.com

    Regards
    To Find Out more About Attunity Technology:
    Attunity
    or:
    Contact Us

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •