Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    4

    Unanswered: How do I use Result set returned from SP to calling program?

    Hi.

    I am new to programming with DB2. I need to return a result set to the calling program but I do not know how to declare the locators to point to the
    result set returned by the SP. I declared the cursor as WITH RETURN.

    I have been reading the SQL reference book but it does not have an example to initialize the locators. It jiust said to DESCRIBE the SP the associate the LOCATORS. The example shows:

    ASSOCIATE RESULT SET LOCATORS (:RS1) WITH PROCEDURE proc_name

    What goes into the host variable RS1?

    Any help will be much appreciated. thanks!

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Nov 2007
    Posts
    4
    Thank you!

  4. #4
    Join Date
    Nov 2007
    Posts
    4
    this does not seem to work in DB2 for Z/os. I'm using COBOL as host language. Is there an equivalent statement for DB2 for Z ?
    Thanks.

Posting Permissions

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