IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can i increase cobol array size


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vamskrish
Warnings : 1

New User


Joined: 31 Jan 2007
Posts: 27
Location: virginia

PostPosted: Mon Jun 11, 2007 9:21 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jun 11, 2007 11:07 pm
Reply with quote

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
View user's profile Send private message
vamskrish
Warnings : 1

New User


Joined: 31 Jan 2007
Posts: 27
Location: virginia

PostPosted: Mon Jun 11, 2007 11:17 pm
Reply with quote

thanks for ur repy. each entry is approx., 90 bytes.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jun 11, 2007 11:24 pm
Reply with quote

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
View user's profile Send private message
vamskrish
Warnings : 1

New User


Joined: 31 Jan 2007
Posts: 27
Location: virginia

PostPosted: Tue Jun 12, 2007 12:28 am
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jun 12, 2007 12:55 am
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jun 12, 2007 1:11 am
Reply with quote

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
View user's profile Send private message
vamskrish
Warnings : 1

New User


Joined: 31 Jan 2007
Posts: 27
Location: virginia

PostPosted: Tue Jun 12, 2007 1:31 am
Reply with quote

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
View user's profile Send private message
vamskrish
Warnings : 1

New User


Joined: 31 Jan 2007
Posts: 27
Location: virginia

PostPosted: Tue Jun 12, 2007 1:32 am
Reply with quote

in addition to the above, do u think the problem could be because of compiling below 16mb line...
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jun 12, 2007 1:42 am
Reply with quote

icon_eek.gif icon_eek.gif icon_eek.gif Why are still "below" the line? icon_eek.gif icon_eek.gif icon_eek.gif
With any recent COBOL, the default is ABOVE.......What (or why) is this compiling below?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 12, 2007 2:21 am
Reply with quote

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
View user's profile Send private message
TG Murphy

Active User


Joined: 23 Mar 2007
Posts: 148
Location: Ottawa Canada

PostPosted: Tue Jun 12, 2007 7:29 pm
Reply with quote

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
View user's profile Send private message
vamskrish
Warnings : 1

New User


Joined: 31 Jan 2007
Posts: 27
Location: virginia

PostPosted: Wed Jun 13, 2007 7:49 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Jun 13, 2007 10:38 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Wed Jun 13, 2007 11:05 pm
Reply with quote

Any answers to Dick's questions?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 13, 2007 11:16 pm
Reply with quote

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
View user's profile Send private message
TG Murphy

Active User


Joined: 23 Mar 2007
Posts: 148
Location: Ottawa Canada

PostPosted: Wed Jun 13, 2007 11:35 pm
Reply with quote

Yes - please tell us more about what you are trying to do.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top