View previous topic :: View next topic
|
Author |
Message |
vamskrish Warnings : 1 New User
Joined: 31 Jan 2007 Posts: 27 Location: virginia
|
|
|
|
hi
currently i have a cobol table with array size 50000. i.e. occurs 50000 times. i would like to increase this size to 150000 times but i am unable to. getting a compile error. i understand that there is some storage issue with this increment. whats the max limit of the array and how can i increase it and what are the various compile options i can use.
thanks
vamshi |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Assuming you have Enterprise COBOL, a quick look at the Language Reference found Appendix B. Compiler limits.
How big is each entry in the array?
If each entry is greater than 111 bytes, 150,000 entriles will exceed the max table size.
If that is not it, what else can it be? |
|
Back to top |
|
|
vamskrish Warnings : 1 New User
Joined: 31 Jan 2007 Posts: 27 Location: virginia
|
|
|
|
thanks for ur repy. each entry is approx., 90 bytes. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
vamskrish wrote: |
thanks for ur repy. each entry is approx., 90 bytes. |
112 is "approx., 90 bytes" too.......Use the compole listing to get the length of each entry in the array. While you are at it, get the length of the 01 group item that contains the array from a compile that worked (the 50,000 one?).
What else is in the 01 that contains the array?
What is the exact error you are getting? |
|
Back to top |
|
|
vamskrish Warnings : 1 New User
Joined: 31 Jan 2007 Posts: 27 Location: virginia
|
|
|
|
thanks. ok the length of each element of array is 90. well here is what i have -
01 table-array.
05 array-cnt pic s9(9) usage comp.
05 array-max-cnt pic s9(9) usage comp. (this will have value 50000)
05 ws-array occurs 1 to 50000 times depending on array-cnt.
10 ws-a pic 9(30).
10 ws-b pic 9(30).
10 ws-c pic 9(30).
actually i am not getting any error but my results are wrong since we are unable to populate the data beyond 50000 occurances. all that we are doing is calling a subprogram which reads a sequential file and loads the data into the array and goes back to the calling program. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
vamskrish wrote: |
thanks. ok the length of each element of array is 90. well here is what i have -
01 table-array.
05 array-cnt pic s9(9) usage comp.
05 array-max-cnt pic s9(9) usage comp. (this will have value 50000)
05 ws-array occurs 1 to 50000 times depending on array-cnt.
10 ws-a pic 9(30).
10 ws-b pic 9(30).
10 ws-c pic 9(30).
actually i am not getting any error but my results are wrong since we are unable to populate the data beyond 50000 occurances. all that we are doing is calling a subprogram which reads a sequential file and loads the data into the array and goes back to the calling program. |
Since the array is defined with a max of 50000 occurances it seems resonable that you wouldn't be able populate anything beyond that. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
vamskrish wrote: |
actually i am not getting any error but my results are wrong since we are unable to populate the data beyond 50000 occurances. |
grumble, grumble.....
Quote: |
all that we are doing is calling a subprogram which reads a sequential file and loads the data into the array and goes back to the calling program. |
I know that this is a stupid question, but has the subprogram been made aware of the fact that the array is now three times larger than it used to be? |
|
Back to top |
|
|
vamskrish Warnings : 1 New User
Joined: 31 Jan 2007 Posts: 27 Location: virginia
|
|
|
|
well. yes we cannot populate beyond 50000 and yes the subprogram was made aware of that fact and we are handling the condition where in if it exceeds beyond 50000 it writes to error report.
my concern is that, when we are increasing the limit i am getting compilation error, some storage issue. i could only increase to 85000 but not beyond that. but i want to increase it to 150000, so inorder to handle such a limit how do we increase the storage. do u think the amode31 or rmode31 options will work? |
|
Back to top |
|
|
vamskrish Warnings : 1 New User
Joined: 31 Jan 2007 Posts: 27 Location: virginia
|
|
|
|
in addition to the above, do u think the problem could be because of compiling below 16mb line... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Why are still "below" the line?
With any recent COBOL, the default is ABOVE.......What (or why) is this compiling below? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
A couple of questions - maybe not exactly on the mark, but i was just thinking out loud.
1. how are 3 30-digit fields used?
2. possibly use 3 arrays (each with an 01 and mentioned in the CALL) , instead of one (an "a" array, and a "b" array, and a "c" array). . . not pretty, but gets around the current "limit" you are dealing with. |
|
Back to top |
|
|
TG Murphy
Active User
Joined: 23 Mar 2007 Posts: 148 Location: Ottawa Canada
|
|
|
|
You mentioned a compile error - some storage issue. Can you show us this error?
By the way, you should also review your design. The fact that you need to boost the table from 50000 to 150000 tells us that the maximum case scenario may not be stable - that in another year or two you may be faced with having to boost it upwards again - from 150000 to 250000.
Of course you know better than us whether this is the case - but make sure that your design is future-proof. My fear is that it is not.
Is it possible to adopt a design that does not require you to load the entire file into memory? If so, then you may be better off doing that. If you can tell us more about your logic, then folks here may be able to suggest alternate designs. |
|
Back to top |
|
|
vamskrish Warnings : 1 New User
Joined: 31 Jan 2007 Posts: 27 Location: virginia
|
|
|
|
hey thx for all ur replies. well as u mentioned its not future proof so we have replaced that logic with writing into ksds vsam files. but the problem with using this new logic is that the job is taking 7 hrs to execute when compared to 55 min with the array logic. so i was wondering if we can go back to array logic and try to increase the storage somehow.
so do u think accessing vsam takes more time than accessing array?
we r now thinking of replacing the vsam logic with db2 logic. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
vamskrish wrote: |
but the problem with using this new logic is that the job is taking 7 hrs to execute when compared to 55 min with the array logic. so i was wondering if we can go back to array logic and try to increase the storage somehow. |
Make sure the key and the CI (and CA) sizes are correct for the primary processing and make sure it has enough index and data buffers.
In a perfect world, the array logic would be fastest, fillowed by VSAM keyed and DB2, in that order. The difference between the three can be quite small or quite large or not even in that order depending upon tuning. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
Any answers to Dick's questions? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Phil,
I was wondering 'bout that myself. . . .
Given the difference in execute times, i'm also wondering how many "hits" there are?
If we know more about the process and not just this small part of it, we could possibly suggest some good alternatives. |
|
Back to top |
|
|
TG Murphy
Active User
Joined: 23 Mar 2007 Posts: 148 Location: Ottawa Canada
|
|
|
|
Yes - please tell us more about what you are trying to do. |
|
Back to top |
|
|
|