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

Maximum Size of Array


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

New User


Joined: 19 Nov 2007
Posts: 4
Location: India

PostPosted: Wed Jan 16, 2008 6:47 pm
Reply with quote

Hi,

I have the below array in one of our copybooks.

05 TBL-CLOTH PIC X(96000).
88 JOB-START VALUE LOW-VALUES, SPACES.

05 TBL-LINER REDEFINES TBL-CLOTH.
10 CS-TAB OCCURS 8000.
15 CPGN PIC X(06).
15 SRCC PIC X(06).

...and i have a requirement to change the size of CS-TAB to the maximum size cobol allows...

Could you pls assist?

Our installation uses VS COBOL II... FYI.

Thanks.
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 Jan 16, 2008 6:51 pm
Reply with quote

Why not just try various values till you hit the max?

A binary search is most efficient. Try a huge number that will fail, then try half of that. If it works, try halfway up to your 1st try; if not, try halfway down. Now iterate the previous sentence.

This should take you maybe 30 minutes, rather than the several days you'll wait for an (either wrong or installation specific (and you won't even know which, if either)) answer you'll get here.

Let us know the answer please.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jan 16, 2008 6:52 pm
Reply with quote

Here's a link to the documented specifications for limits.
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 Jan 16, 2008 8:48 pm
Reply with quote

You are asking for the biggest possible OCCURS. You really should figure out how much you need instead of asking for the biggest possible number.

If you don't know this number - then how do you know that this number will be less than what is possible? Maybe the use of a table is no longer appropriate because your volumes have grown too big. Maybe you need to store your data in a database instead of a table.

I think you should first figure out how big you need your OCCURS to be. And then figure out whether COBOL and your system can accommodate this. As well, if your program will run under CICS grabbing all the storage that you can possibly grab will surely result in the CICS performance guys paying you a nasty visit.
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 Jan 16, 2008 11:01 pm
Reply with quote

Hello,

Quote:
and i have a requirement to change the size of CS-TAB to the maximum size cobol allows
A very poor alternative. . . .

This is most likely an extreme waste of resources and if the volume is growing, it will most likely "blow up" one day when it can be least afforded.

Better to implement a solution that uses less resources and will work even with higher volume.
Back to top
View user's profile Send private message
Piyari

New User


Joined: 19 Nov 2007
Posts: 4
Location: India

PostPosted: Thu Jan 17, 2008 11:07 am
Reply with quote

Hi Kevin,

Thanks for the link. This is exactly what i was looking for.

Phil,

Why reinvent the wheel - especially if its just a spec that comes in a manual?

Murphy & Dick,

I am well aware of the storage and performance implications on doing this change, even before i posted this question here.

My customer is stubborn on this change for some reason. I got to prove him wrong....May be with a pinch of strobe and Omegamon stats in test region icon_wink.gif

Anyway thank you all for your time!
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


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

PostPosted: Thu Jan 17, 2008 6:20 pm
Reply with quote

Specs change, manuals get old. If you want to really know for sure, you cannot rely on everything you read.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Jan 17, 2008 6:21 pm
Reply with quote

Our TECH support for the mainframe would kill this app everytime it ran for being a memory hog. I had one app I was trying to write for maximum flexibility and they said if I put it into production they would disable it because it used too much memory. Using that much memory killed the CICS region I was testing in.
Back to top
View user's profile Send private message
TG Murphy

Active User


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

PostPosted: Mon Jan 21, 2008 8:07 pm
Reply with quote

Piyari,

Very important for to know whether you need to run your program under CICS or batch. If batch only, then I would suggest you just experiment to see what works at your shop.

Last time I checked we had a batch program that defined a table that was 30,000,000 bytes long. So I checked again and this time I found a program that had several 20,000,000 byte tables and this program's total working storage was 76,000,000 bytes. This is huge and is not typical.

Keep in mind - the group that owns these programs was very careful in getting approval to do this. Just to the same so that your ass is covered.

Good luck..
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 Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
No new posts Dataset size increase on adding 1 byt... DFSORT/ICETOOL 8
Search our Forums:

Back to Top