View previous topic :: View next topic
|
Author |
Message |
sibi Yohannan
New User
Joined: 15 Apr 2009 Posts: 47 Location: Bangalore
|
|
|
|
I have a need to declare an array of 100, but in the furture there is a chance to increase that as per the need, how flexible I can declare the array in dynamically?
Is it possible to declare an array dynaically so that it can accomodate any number of data.
I am aware of below type of Dynamic array
Code: |
01 PAYROLL.
02 PAYROLL-WEEK PIC 99.
02 PAYROLL-HOURS PIC 999 OCCURS 1 TO 52
DEPENDING ON PAYROLL-WEEK. |
Where the maximum size of the array is 52 and the space allocated to this array depends on the PAYROLL-WEEK variable defined. Is the advatage of defining a dynamic array is only with Saving the space allocation or is there any other advantage over that?
Please advice and correct me |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Are you building the array based upon number of records in a file that you read into your program?
Bill |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Quote: |
space allocated to this array depends on the PAYROLL-WEEK variable defined. |
Not quite correct. Actually, space will be allocated for all occurences regardless of DEPENDING ON clause.
Check below URL if you need more information-
ODO Old topic
If you are looking for dynamic memory allocation then you should look at LE services CEEGTST and CEEFRST for starters. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
Back to top |
|
|
|