Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 Temporary Table: -805 error and Missing Data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
sprikitik

New User


Joined: 29 Jan 2007
Posts: 58
Location: Makati City, Philippines

PostPosted: Tue Dec 22, 2009 7:21 am    Post subject: DB2 Temporary Table: -805 error and Missing Data
Reply with quote

Hello,

I have 2 programs, Program A and B. Program A calls Program B. Program B inserts records in a TEMPORARY TABLE. After calling Program B, Program A will load the data inserted in the TEMPORARY table to a cursor. My questions are:

a. What could be the reason why im getting a -805 when i tried to OPEN the declared cursor for the temporary table in Program A?

b. Does a DB2 temporary table looses its contents after program execution? I was able to verify that records are being inserted in the temporary table but after program execution and i used spufi, the inserted records are already gone.

Thanks,
Chris
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Dec 22, 2009 7:42 am    Post subject:
Reply with quote

use IBM's LookAt Website to see what a -805 indicates and solve that problem, which will probably solve your other problem.

you should also read about temporary tables (Global, GTT) there are 3 types.
Since you did not tell us which type,
we have no idea what the problem is.

No,
I lied,
actually,
we do,
but I think it would be in your best interest to learn about temporary tables.
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Tue Dec 22, 2009 12:09 pm    Post subject: Re: DB2 Temporary Table: -805 error and Missing Data
Reply with quote

sprikitik wrote:
Hello,

I have 2 programs, Program A and B. Program A calls Program B. Program B inserts records in a TEMPORARY TABLE. After calling Program B, Program A will load the data inserted in the TEMPORARY table to a cursor. My questions are:

a. What could be the reason why im getting a -805 when i tried to OPEN the declared cursor for the temporary table in Program A?

b. Does a DB2 temporary table looses its contents after program execution? I was able to verify that records are being inserted in the temporary table but after program execution and i used spufi, the inserted records are already gone.

Thanks,
Chris


a. There are simpler reasons for -805 and the temp table has nothing to do with it.

b. Yes. That is the property of temp tables.
Back to top
View user's profile Send private message
ajeshrn

New User


Joined: 25 Mar 2009
Posts: 78
Location: India

PostPosted: Thu Dec 24, 2009 11:39 am    Post subject:
Reply with quote

Hi sprikitik

I dont think the reason for you getting -805 would be related to your Global Temporary Table.Please check whether the Bind Package and Plan has been successful in the above programs.

Yes, for your second question. The Global Temporary Table will be dropped when the Program conrtol is lost. Incase if you are trying to get the data from Program B GTT and displaying the content in Program A, then try using ON COMMIT PRESERVE ROWS while you declare the GTT.

Please do refer the docs given by dbz
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us