MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DB2-QMF-Temp Table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Wed Jan 04, 2006 11:53 pm    Post subject: DB2-QMF-Temp Table Reply with quote

Hi,

I am declaring a Temporary Table and Trying to Select the columns declared in the Temp Table (Obviuosly , at this time, there won't be any values).

PROC
Quote:
RUN QUERY UID.Q1
RUN QUERY UID.Q2


UID.Q1
Quote:
DECLARE GLOBAL TEMPORARY TABLE TEMP
(ID CHAR(09) ,
AMC1 CHAR(09) ,
AMC2 CHAR(01) ,
AMC3 CHAR(01)
);

UID.Q2
Quote:
SELECT * FROM TEMP;


The error I am seeing is,
Quote:
TEMP could not be found.

Explanation:
The query refers to TEMP.
Nothing with this name exists in the database.

Suggested Action:
Check for a spelling error.


I am Declaring and Selecting in the same session.

Can someone here help me with
- what I have to really check before doing a DECLARE of Temp Table
- how to check the required objects whether it exists or not
- a way to work with Temp Table in QMF

I am not trying to do this in Batch. Upon running the query, I am expecting to see the result in the desired Report.

Suggestion and Question to help you out in solving the issue are most welcome.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Jan 05, 2006 9:00 am    Post subject: Reply with quote

sakreg,

Please go thru this topic for a better understanding of the Global temporary table.

http://mvsforums.com/helpboards/viewtopic.php?t=5543

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Thu Jan 05, 2006 9:52 am    Post subject: Reply with quote

sakreg,

After going through Kolusu's link, try out running the same set of declare and select statements in the same file using SPUFI.
I will leave it to you to try it out and publish the results here. Comparing the results between QMF and SPUFI, and reading the material in Kolusu' link will make everything clear to you.
Let us know if you still have questions.

HTH...Regards,
Manas
_________________
There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948)
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Thu Jan 05, 2006 11:28 pm    Post subject: Reply with quote

I am able to execute the SQL's successfully in SPUFI. But when it come to QMF, it fails to run. This is Strange! Since the Qry run fine in SPUFI, we can conclude that the necessary Tablesapce and Dataspace are in place. Am I missing anything else in QMF?
Back to top
View user's profile Send private message
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Fri Jan 06, 2006 10:19 am    Post subject: Reply with quote

sakreg,

That can only mean that QMF does not support declared temporary tables. Which version of QMF are you using?. If my memory serves me right, I remember reading a APAR somewhere that QMF v6 does not support declared temporary tables.
Declared temporary tables came very recently (as an enhancement to DB2 v6) and so it is not surprising that QMF does not support them.

BTW...Just curious...What exactly is the requirement of using declared temporary tables from QMF.

Regards,
Manas
_________________
There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948)
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group