Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How can i increase cobol array size

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How can i increase cobol array size
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: 3158
Location: Tucson AZ

PostPosted: Mon Jun 11, 2007 11:07 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Mon Jun 11, 2007 11:24 pm    Post subject:
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    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Tue Jun 12, 2007 1:11 am    Post subject:
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    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Tue Jun 12, 2007 1:42 am    Post subject:
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

Site Director


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

PostPosted: Tue Jun 12, 2007 2:21 am    Post subject:
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: 149
Location: Ottawa Canada

PostPosted: Tue Jun 12, 2007 7:29 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Wed Jun 13, 2007 10:38 pm    Post subject:
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

Active Member


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

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

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

Site Director


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

PostPosted: Wed Jun 13, 2007 11:16 pm    Post subject:
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: 149
Location: Ottawa Canada

PostPosted: Wed Jun 13, 2007 11:35 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us