IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reading a GTT define in Subroutine, called from a Stored Pro


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Keanehelp

New User


Joined: 27 May 2008
Posts: 71
Location: USA, CA.

PostPosted: Fri Apr 27, 2012 2:01 pm
Reply with quote

Hi,

I have a Stored Procedure AAA .
SP AAAA calls a subroutine BBB.
Subroutine BBB has a global temporary table, which gets inserted when BBB is called.
I want to read this table from a cursor in AAA.


I am not sure How I am going to do this, any suggestions?
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Apr 27, 2012 9:32 pm
Reply with quote

Hi Nitin,

By defination of GTT that is not possible, i think.

Quote:
DECLARE GLOBAL TEMPORARY TABLE statement does not put a description of the table in catalog table SYSTABLES. The table description is not persistent beyond the life of the application process that issued
the DECLARE statement and the description is known only to that
application process. Thus, each application process could have its
own possibly unique description of the same table.


Try Goooooooogling "db2 stored procedure return resultset"

Thanks,
Sushanth
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
No new posts Invoke stored procedure via batch JCL. DB2 2
Search our Forums:

Back to Top