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
 

 

Is there a size limit for Working-Storage section?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Thu Aug 23, 2012 6:30 am    Post subject: Is there a size limit for Working-Storage section?
Reply with quote

I wonder if there is a size limit for WORKING-STORAGE SECTION.

If there is, how much will it be ? can it hold data for over 3M?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Aug 23, 2012 6:44 am    Post subject:
Reply with quote

The Enterprise COBOL Language Reference manual (link at the top of the page) has all compiler limits in Appendix B Compiler Limits. WORKING-STORAGE has a limit larger than 3M (assuming you mean 3 megabytes here and not the company that makes tape and other products); I've compiled and executed programs using a 10 million byte variable for an XML process.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Aug 23, 2012 6:52 am    Post subject: Reply to: Is there a size limit for Working-Storage section?
Reply with quote

Either as a whole, or as a group item, or as an elementary item, 3M, taking the same guess as Robert, will be nowhere near a problem.

Everytime you wonder about something, just check the manual first.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Thu Aug 23, 2012 7:25 am    Post subject:
Reply with quote

My bad, but I indeed had looked up <COBOL programming guide> and <COBOL programming reference> for answer before I raise this question, but I never expected the Appendix would give me the answer.

Now , I've got the answer: Working Storage Section can hold up to 128M.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 23, 2012 9:07 am    Post subject: Reply to: Is there a size limit for Working-Storage section?
Reply with quote

Are you defining a very large table in WS? If so, consider moving it to LINKAGE as an OCCURS DEPENDING ON and only acquire the storage-amount needed, using LE Callable Service routine "CEEGTST".

An OCCURS DEPENDING ON table defined to WS will always be allocated to its maximum-size.
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: Thu Aug 23, 2012 9:13 am    Post subject:
Reply with quote

Hello,

Quote:
I wonder if there is a size limit for WORKING-STORAGE SECTION.
Why do you wonder?

What are you trying to deal with that the WS limit might be an issue?
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Aug 24, 2012 6:39 am    Post subject:
Reply with quote

hi, dick,

I'm implementing multi-row fetch for DB2 table inquiry, and when I declared the row-set, I had a concern whether the dimention size would impact on the performance or execution of COBOL program.

According to the consultant from HP, " if the large size of rowset causes the data division size exceeds 64K, overlap error might occur when execution" . -->this is their experience, but I have no idea why this would happen, I also did not find any relative information from COBOL manuals.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Aug 24, 2012 7:33 am    Post subject:
Reply with quote

The consultant from HP might be talking about HP COBOL and not Enterprise COBOL.
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: Fri Aug 24, 2012 7:38 am    Post subject:
Reply with quote

Hello,

If one who knows recommends limiting the size to 64k, it might be a good idea to do so. . .

After everything runs perfectly at 64k, it might be ok to experiment with something larger, but be aware that the over 64k problem may not happen often enough to work on - just enough to bring the system down periodically . . .

Why is 64k not sufficient?
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Aug 24, 2012 10:15 am    Post subject:
Reply with quote

hi, dick,
I don't understand why 64k not sufficient. they just told their experience.

they say, if row-set size leads data division too large, there is possibility for program crash, and usually this kind of abend is very very hard to find out.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Aug 24, 2012 10:56 am    Post subject:
Reply with quote

Quote:
there is possibility for program crash


and what kind of crash?

how many rows?
how much storage is used for one (1) row.

the 64k stuff in batch environment is not true,
even with cobol II.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri Aug 24, 2012 1:03 pm    Post subject: Reply to: Is there a size limit for Working-Storage section?
Reply with quote

If 64k is some "problem" it sounds like there is a two-byte unsigned binary field involved.

Why would an HP consultant, per se, know much in detail about DB2 [Edit, whch I can't even spell]? Can you ask specifically, or does that cost too much?
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Aug 24, 2012 8:36 pm    Post subject: Re: Reply to: Is there a size limit for Working-Storage sect
Reply with quote

Bill Woodger wrote:
If 64k is some "problem" it sounds like there is a two-byte unsigned binary field involved.

Why would an HP consultant, per se, know much in detail about DB2 [Edit, whch I can't even spell]? Can you ask specifically, or does that cost too much?

Actually, they were not talking about DB2, but Data division size problem.
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: Fri Aug 24, 2012 9:19 pm    Post subject:
Reply with quote

Hello,

With or without DB2, Bill's observation should still be considered.

Actually, you are the one who mentioned DB2 . . .

If, indeed, there is something in the application that uses some kind of 2-byte binary field for length/displacement/whatever, the 64k may still be an issue. . .

Why not just use the 64k . . . icon_confused.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri Aug 24, 2012 9:32 pm    Post subject: Reply to: Is there a size limit for Working-Storage section?
Reply with quote

Perhaps the HP Consultant was talking through his ear when it comes to Enterprise Cobol, as Robert suggested? OK, you've paid (HP) for it, so go with Dick's suggestion. Get it working with the 64k, then move on to your 3M or whatever you feel you actually need.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Fri Aug 24, 2012 10:00 pm    Post subject:
Reply with quote

dick scherrer wrote:

If, indeed, there is something in the application that uses some kind of 2-byte binary field for length/displacement/whatever, the 64k may still be an issue. . .

Would u please tell me why? What's the connnection between 2-byte binary and 64k size of Data division?
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: Fri Aug 24, 2012 10:06 pm    Post subject:
Reply with quote

Hello,

Once again, you have gotten completely lost. . .

There is no connection between A 2-byte binary and a 64k size of data division. . . The 2-byte binary can hold a maximum value of 64k which has nothing to do with the total size of the data division.

The "why" is because someone who knows the product said so . . .
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri Aug 24, 2012 10:08 pm    Post subject: Reply to: Is there a size limit for Working-Storage section?
Reply with quote

Calculate the value that can be held by an unsigned two-bytes. Or what is FFFF in decimal?

I have never used an IBM Cobol compiler with a Working-Storage limit of less than 1M. If there is a "limit" to something, something is imposing that limit. If there is a limit to something of 64k, then it is likely to be to do with something held in an unsigned binary half-word (two bytes) as the maximum value that that can hold is what you have just discovered. If a limit is 32k, then you'll probably trace it to a signed half-word somewhere along the way.

When you see numbers in decimal, put them into hex. Often helps.
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
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Increase the screen size after split mistah kurtz TSO/ISPF 2 Fri Sep 02, 2016 6:39 pm
No new posts SCRNAME not working on my mainframe? mrsidhu12 TSO/ISPF 7 Thu Sep 01, 2016 2:17 pm
No new posts 2 same CLIST pgm but with different n... boyti ko CLIST & REXX 5 Fri Jun 03, 2016 4:55 pm
No new posts REXX Screen not working due to LINKED... sundarkudos CLIST & REXX 1 Mon May 09, 2016 1:44 pm


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