View previous topic :: View next topic
|
Author |
Message |
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
The consultant from HP might be talking about HP COBOL and not Enterprise COBOL. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 . . . |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|