View previous topic :: View next topic
|
Author |
Message |
Suryyogi
New User
Joined: 17 Jun 2006 Posts: 27
|
|
|
|
How can we use dynamic table in easytrive...
I want to use a table which could store 100 to 500 data items. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Use OCCURS to define your table/array.
If this is not what you are looking for, please post more detail. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Dick,
I believe he is looking for easytreive equivalent of COBOL OCCURS DEPENDING ON statement.
To my knowledge, you can't acheive this in easytreive. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Suryyogi wrote: |
How can we use dynamic table in easytrive...
I want to use a table which could store 100 to 500 data items. |
Even in COBOL, the working storage is reserved for the max size....
Define for max and set a count of how many actual entries there are....
Should be a piece of cake...... |
|
Back to top |
|
|
Suryyogi
New User
Joined: 17 Jun 2006 Posts: 27
|
|
|
|
Well , I am looking for :
I will count how many data items I have and on that count I want to define table size.
I am looking for easytreive equivalent of COBOL OCCURS DEPENDING ON statement. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You have to control this in your code.
Define the table the largest it might ever validly be.
Count entries as you move them into the table.
When processing the table, make sure the code does not refer to any entries beyond the last one used. |
|
Back to top |
|
|
|