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...
Joined: 13 Feb 2004 Posts: 360 Location: Bangalore
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 ????