Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DB2 :: Getting -504 Cursor Name GTT-ARTS-CURSOR is not Declared

$
0
0
Author: Robin Sulsona
Subject: Getting -504 Cursor Name GTT-ARTS-CURSOR is not Declared
Posted: Fri Mar 17, 2017 1:43 am (GMT 5.5)

I have a COBOL program (RSJUNK) that is calling a Stored Procedure (SPJUNK). The Stored Procedure is building my GTT and when I am done I open a cursor that is defined "WITH RETURN TO CALLER" as part of the DECLARE.

When I return to RSJUNK, I look to see if it found data or not based on the content of my "output" parm of my stored procedure. When I have data I am doing the "ASSOCIATE LOCATORS (:L0C) WITH PROCEDURE SPJUNK " and the "ALLOCATE GTT CURSOR FOR RESULT SET :LOC".

When I then try to fetch this cursor, I am getting a -504 Cursor name is not declared. Could someone please shed some light on what I am missing?

Thanks for any help you can provide.
_________________
Robin Sulsona
SAA


Viewing all articles
Browse latest Browse all 8500

Trending Articles