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
 

 

Cobol- DB2 Array

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Thu Jul 17, 2008 5:40 pm    Post subject: Cobol- DB2 Array
Reply with quote

I have a condition like this

I am using a query to pass values to an array. The array is occuring 10 times. The query may return 100 records . The array varibales are all inside a
copybook so i cannot change the copy book value

Is there any way we can pass the first 10 values to array first then the next 10 values and so on...
Back to top
View user's profile Send private message

ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Thu Jul 17, 2008 6:50 pm    Post subject:
Reply with quote

Prasanth,

First of all you must be aware of the fact that after populating the array with first 10 values if you do it again then initial 10 values will be overridden by the new values ... so here assuming you have to do some kinda processing on the fetched values ....

fetch the first 10 values to the array .. maintain a counter ... when the count touches 10 stop fetching and process the array values ..once its done again go for the fetch ...fetch next 10 rows ... make sure your cursor does not get closed ... note that at any point of time only 10 values will be available thru your arrays ...

but if this is the case is there any problem in fetching rows one by one and then processing each record ????

im not sure abt your requirement ... [/code]
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Thu Jul 17, 2008 7:27 pm    Post subject:
Reply with quote

What is your SQL?
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Fri Jul 18, 2008 12:33 pm    Post subject: Reply to: Cobol- DB2 Array
Reply with quote

Code done through Scrollable cursor ..

Thanks for the response
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


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