View previous topic :: View next topic
|
Author |
Message |
noorkh
New User
Joined: 06 Mar 2006 Posts: 76 Location: Chennai
|
|
|
|
Hi,
I have requirement to use Dynamic array in my cobol code.
I have declared my array as follows:
01 ARRAY-REC
03 ARRAY-CNT PIC S9(4) COMP.
03 ARRAY-FIELDS OCCURS 1 TO 2000 TIMES
DEPENDING ON ARRAY-CNT
INDEXED BY IN-INDX.
05 ARRAY-FLDS PIC X(1500).
This array will be used to store the records read from file. While reading the records i verify to the particular transaction then only i will store into this. So i don't know how much big table will be until or otherwise i read.
So can you tell me where to increment ARRAY-CNT or should i initialize with some count. Please clarify me.
As of now I am incrementing this count before each move to this Array.I have similar type of 3 more arrays. It is giving me insufficient storage error.
Can you help me out?
Thanks in advance
Noor |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
Under manuals listed in this forum refer to
VS COBOL II Programming Guide section 3.6.4.4 Complex OCCURS DEPENDING ON
Hope this helps. |
|
Back to top |
|
|
|