Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 41
  • Last Modified:

How to call stored procedure in DB2

I have used below lines to execute the stored procedure. But it didn't return any results. could you please help me regarding that.

proc sql;
   connect to db2;
   execute (call "DBAB.SP10");
quit;
0
gayathri grandhe
Asked:
gayathri grandhe
1 Solution
 
Radek BaranowskiFull-stack Java DeveloperCommented:
Are you sure your procedure is written to actually return any results to the outside caller ?

Make sure it contains RETURN statement.

https://www.ibm.com/support/knowledgecenter/en/SSEPGG_9.7.0/com.ibm.db2.luw.apdv.sqlpl.doc/doc/c0024360.html
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now