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: 6967
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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm


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