Operating System - HP-UX
1819802 Members
3264 Online
109607 Solutions
New Discussion юеВ

Too big Data Division causes Cobol compilation failure

 
Madhur Goel
New Member

Too big Data Division causes Cobol compilation failure

MY structure occupies memory of 99*10000*(4+240) bytes, roughly 240Mb. Now i want to add two new fields (24 bytes) into the structure; unfortunately, this change causes the total size of the Data Division to pass the maximal size allowed by Cobol compiler, and the compilation will fail with such error message:

21718 01 WS33-BAN-LIST-SHORT-NAME .
* 16-S** ( 0)**
** Data space too large

Can any one who had faced this problem share how to handle this into code.

Thanks in advance.
6 REPLIES 6
Dennis Handly
Acclaimed Contributor

Re: Too big Data Division causes Cobol compilation failure

What is the name of your compiler? Microfocus?
If your compiler supports 64 bit, you wouldn't have to worry?

You could process parts by using files.
James R. Ferguson
Acclaimed Contributor

Re: Too big Data Division causes Cobol compilation failure

Hi:

Perhaps you have fields of numeric data that could be "packed" with an alternate "picture" declaration halving the storage requirement of those pieces.

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: Too big Data Division causes Cobol compilation failure

>JRF: Perhaps you have fields of numeric data that could be "packed" with an alternate "picture" declaration halving the storage requirement of those pieces.

I believe you are talking about USAGE, not PICTURE? USAGE DISPLAY vs COMP
James R. Ferguson
Acclaimed Contributor

Re: Too big Data Division causes Cobol compilation failure

Hi (again):

> Dennis -> JRF: I believe you are talking about USAGE, not PICTURE? USAGE DISPLAY vs COMP

Yes, indeed I was thinking 'usage' as cited when I wrote 'picture'. Thanks.

If this is an option for Madhur, I would suggest that a re-structure of the '01' area be made to condense all DISPLAY elements into one region and all COMP ("packed") elements into another. At least on COBOL compilers I was once familiar with this eliminated "filler" nibbles for byte alignment.

Regards!

...JRF...
Madhur Goel
New Member

Re: Too big Data Division causes Cobol compilation failure

Hi,

Hi Dennis & JRK,
Thanks for your responses.

Dennis:- Compiler is Microfocus and computer is 64-bits. But i did not understand the solution suggested by you. can you please elaborate. if you can give me some example, it will be great.

JRF :- Most of the elements in structure are DISPLAY with alphanumeric value. i am not sure how to do the restructure.

I am attaching the structure for your reference. i hope it will help you.

Frankly speaking i am a novice COBOL programmer. So it is bit hard for me to understand jargons of COBOL.
Dennis Handly
Acclaimed Contributor

Re: Too big Data Division causes Cobol compilation failure

>Compiler is Microfocus and computer is 64-bits.

Does MF COBOL allow you to create 64 bit applications?

>I did not understand the solution suggested by you. can you please elaborate.

Basically hand waving. Divide your task into parts so you don't need that large array. Process a file record by record.

>Most of the elements in structure are DISPLAY with alphanumeric value.

Right, all numeric fields are already COMP.

>I am a novice COBOL programmer.

So I have forgotten more about COBOL than you know? :-)