Internal GPT table exceeds 64K maximum

Hello again, amigos. I hope you have been keeping well. Just had Thanksgiving holiday here in the US which was a good break.

I received this message “NAT0881 During compilation, the internal GPT table exceeds 64K maximum” while trying to STOW a Natural program (Natural IBM Mainframe version 4.1.3).

What does this message mean AND is there a Compiler option to increase the size of the GPT table maximum ?

Are there other ways to get past this error ?

Thanks again for your valued help.

Natural can give you the answer. Just enter HELP 0881 on the command line and you will receive


HELP-------------------------- NAT ERROR 0881 ---------------------------------
 COMMAND ==>                                                           0881    
                                                                               
 During compilation, the internal ... table exceeds ... maximum.               
                                                                               
                                                                               
 During compilation of a program, various tables are generated to              
 build the object. One of these tables exceeds its maximum size.               
                                                                               
 Identification list:                                                          
 GPT - Generated program buffer       KST - Constant buffer                    
 MPT - Array structure buffer         RNM - SQL generation buffer              
 SBT - Database access buffer         VAT - SQL generation buffer              
 VDT - Variable access buffer                                                  
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
 According to the buffer identification, the program must be reduced           
 in size.                                                                      

In your case: split you program into subprograms. This is always possible.

Thanks, Wilfried, for your response.

The program is small … maybe 3000 lines, POSSIBLY 1000 statements. Before I hit the limit, compiles took only a couple of seconds.

Despite the finality of “the program must be reduced in size” I am left wondering whether there are other alternatives. Does anyone know of some way to increase the size of the table or some other workaround ?

There is no NatParm to increase the GPT.

There are many ways to decrease source size or data size, but your options are limited when it comes to the GPT.

Look for duplicated code that could be PERFORMed. Because code is generated for the PERFORM, you need a fair bit of code in a duplicated block to see any improvement.

The same goes for the CALLNAT - look for a reasonably large chunk of code to convert into a subprogram.

And have a look into INCLUDEs!

[quote="Wilfried B

Thanks for your help. I have split the program in twain.

I have to say though that 64K limit on a table is pretty tiny in todays environment. In MVS Cobol I several times wrotes programs with tables on the order of a megabyte (several consecutive Level 01 areas with no index checking).

SAG should really look into increasing the size limit on this table possibly drawing storage for all the listed tables (in the 2nd post) from a common pool since many (like the SQL tables in my program) may not be used for a particular program.

Now you talk about the size of the data area, not the size of the generated program. Of course, the data area of a program can be gigabytes (until the machine explodes), but the size of the generated program (object code) is limited (and that is good!)

To the compiler, the GPT table IS a data area.

If you are correct, what’s the point of limiting the size of Natural programs to 64K when even PC programs may be many megabytes ?

Now you are becoming a quibbler. The program the OS runs ist called Natural and this may be more than 64K. This program (run time, for you) runs the Natural program you have written. It is a good idea to split huge task into several modules instead of having a single big one, as we have a multi user environment and small programs can be swept out and in more easily.

This is a batch program. What are your concerns in this area, Wilfried ?

Batch programs also use the Natural Bufferpool. And this can be shared with online applications…

Generally it is not a good idea to put everything into one big program. To be able to reuse functions of this program, you should split the program into such reusable functions.