55 pts.
 Pre runtime array
Hi all I am working on pre runtime array, the from file i am using contains 15,000 records, when i specify the value less than 15,000 in DIM( ) i am getting this error in run time File has too many entries to load the array or table (C D F) but when i changed the DIM element size 15,000 or greater (DIM(15000) it is working how to specify the DIM element size dynamically??. thanks in advance

Software/Hardware used:
AS400 V5R3
ASKED: November 29, 2012  6:38 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. dinuas400   55 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

If you use a pre-runtime array, there is no way to handle a dynamic array. It’s “pre-runtime”. If you need dynamic, allocate memory during runtime and load records into the allocated memory. Dynamic processing can only happen during runtime. — Tom

 107,945 pts.

 

Thanks Tom,can u please suggest some way to avoid this errorFile has too many entries to load the array or table (C D F)

 55 pts.

 

please suggest some way to avoid this error…
 
A number seem reasonable. The obvious is to declare a larger array.
 
But I don’t know why you’re loading records into an array in the first place. Without knowing anything about the purpose, there’s no way to know what suggestions make sense.
 
Tom

 107,945 pts.