Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Is it possible declare table in Procedure division?.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
itdsen

New User


Joined: 20 Sep 2006
Posts: 17
Location: Chennai

PostPosted: Thu Jun 12, 2008 5:26 pm    Post subject: Is it possible declare table in Procedure division?.
Reply with quote

Is it possible declare table in Procedure division?.

if its possible then Explain difference in it.
Back to top
View user's profile Send private message
References
PostPosted: Thu Jun 12, 2008 5:26 pm    Post subject: Re: Is it possible declare table in Procedure division?. Reply with quote

vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 298
Location: Bang,iflex

PostPosted: Thu Jun 12, 2008 5:32 pm    Post subject:
Reply with quote

Whether, question is CREATE TABLE or DECLARE CURSOR, reformat the question.
Back to top
View user's profile Send private message
itdsen

New User


Joined: 20 Sep 2006
Posts: 17
Location: Chennai

PostPosted: Thu Jun 12, 2008 5:38 pm    Post subject: Reply to: Is it possible declare table in Procedure division
Reply with quote

About declare cursor
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 121
Location: Chennai

PostPosted: Thu Jun 12, 2008 6:22 pm    Post subject:
Reply with quote

There is no real difference between declaring a cursor in working storage or in procedure division. I remember reading somewhere that when a cursor is declared in procedure division programmers try to validate the sqlcode after that although the value in the sqlcode will the one of the last executed sql statement (prior to the cursor declaration), this may lead to unwanted confusion and hence it is recommended to code the cursor in the working storage.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1