IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Bind variable


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
learnmf

Active User


Joined: 14 Mar 2005
Posts: 123

PostPosted: Mon Aug 22, 2005 3:11 pm
Reply with quote

Dear friends

Quote:
I want to declare a cursor for more then one time for different conditions like.

Ex In 1st cursor cola= 'ram'

in Secor cursor declaration cola='bab'

So Can it be possible to declare cursor using temp var so that i can open it more then once by passing desired values in 'cola'.
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Mon Aug 22, 2005 5:13 pm
Reply with quote

Yes it is possible. Just use a host variable in the where clause and move the required value to this variable before opening the cursor. Just make sure that the cycle cursor open, fetch and close is not disrupted.
Back to top
View user's profile Send private message
learnmf

Active User


Joined: 14 Mar 2005
Posts: 123

PostPosted: Mon Aug 22, 2005 6:07 pm
Reply with quote

Thanks bonniem
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top