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 

Fetch cursor and declare cursor different number of columns

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


Joined: 13 Mar 2006
Posts: 15
Topics: 9

PostPosted: Wed Aug 02, 2006 6:02 am    Post subject: Fetch cursor and declare cursor different number of columns Reply with quote

Can we declare a cursor for 5 selecting 5 columns and while fetching we give 6 variables in cobol program.

If this is correct can u tell what is the which will be getting into the extra column

example:
Code:

declare cursor  sel1
select a,b,c
from table


fetch sel1 into
:A,
:B,
:C
:D


Thanks & Regards
Vinay
Back to top
View user's profile Send private message Yahoo Messenger
sriramla
Beginner


Joined: 22 Feb 2003
Posts: 74
Topics: 1

PostPosted: Wed Aug 02, 2006 8:12 am    Post subject: Reply with quote

If you code this and try, you will see whether you get a clean compiled code or not to begin with. By any chance you get a clean compile & a clean bind, you can run this program to see what happens. It would be nice if you can post back the results.
Back to top
View user's profile Send private message
Maximus
Beginner


Joined: 17 Nov 2005
Posts: 21
Topics: 11

PostPosted: Fri Aug 04, 2006 4:50 am    Post subject: Reply with quote

Vinay,

If C can be nullable, then extra column D will hold the null indiactor value.

Regards,
Maximus
Back to top
View user's profile Send private message
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