Trying to call a DB2 stored procedure in IBM System i Access

54,650 pts.
Tags:
DB2
Stored Procedure
System i
I'm trying to test a DB2 stored procedure that's running on an AS/400 system. Our company currently has the IBM System i Access for Windows installed that runs SQL commands against the DB2 database.

My big question: What is the syntax to execute a stored procedure that takes in a parameter / returns a result as an output parameter and print the value to the screen?

I'm basically trying to figure out if I can execute the procedure and see the results in the GUI tool. Thanks for all the help.
ASKED: December 17, 2013  5:53 PM
UPDATED: December 18, 2013  5:38 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’ve got the options set to:


Display Results in a seperate window.  <– in/out paramenters will apear at the bottom of calling window but result sets will each be in a seperate window.


 

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb

    //in Navigator - run SQL script

    //if you need to run any cl's --

    CL: ADDLIBLE TESTDTA;
    CL: ADDLIBLE TESTPGM;

    //to call stored procedure

    Call proclib.procName('Char Parm', 15, '005',003);


    // So procName had 4 parameters (Char, Decimal , char, decimal)

    48,545 pointsBadges:
    report
  • philpl1jb

    I've got the options set to:

    Display Results in a seperate window.  <-- in/out paramenters will apear at the bottom of calling window but result sets will each be in a seperate window.

    48,545 pointsBadges:
    report
  • TomLiotta

    What is the syntax to execute a stored procedure that takes in a parameter / returns a result as an output parameter and print the value to the screen?

    As Phil mentions, the syntax is the normal syntax for a SQL CALL statement. The 'Messages' pane will show OUT and INOUT parm values after a CALL successfully completes.

    If the purpose is to return a value rather than a result set, you'd almost certainly be better off creating a FUNCTION than a PROCEDURE.

    Tom

    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following