mgman...@gmail.com wrote:
> I am hitting the error **** BINDER ERROR 53 **** No space left for stack after data block allocation when compiling a COBOL program is Tandem server, previously we just move the variables to Extended-Storage but now, all variables are in Extended-Storage, is there other way to fix this issue?
If you can switch to the native mode COBOL compiler (probably ecobol unless you have a very old system), that would eliminate the problem. If the program is pure COBOL85, that should be a fairly easy job. If the program calls any of your own TAL or C code, you would also have to switch those called procedures to native mode. And some of the calls to utility functions provided with COBOL85 have to be changed a bit when switching to native mode. Usually, the job is not very hard, though you might have an unusual case.
If you believe you cannot easily switch to native mode, take the last version of your program that did not run into this problem, list the memory map, and try to figure out what all is using space in the data segment below the 32K boundary. Perhaps you will find something taking space there that you were not aware of and can change.
I believe that COBOL uses space below 32K to hold pointers to the variables that are placed in extended storage. If so, and if you can put many extended storage variables under a single 01 level, that might conserve some space to get you past this problem, but you would be working on the edge of running out of space again soon, and it would be wise to seek a better long-term solution, such as converting to native mode.
Of course, there also is the approach of splitting the program into two or more programs. If it is a typical context-free Pathway server, it should not be a very difficult problem to take some of the functions offered by this program and move them to another program, though finding all the places that requests are sent and changing them might be a lot of work. You might avoid changing the requesters by introducing a new program that you use for the original serverclass, which looks at the request and uses SERVERCLASS_SEND to send the request on the to correct one of the two new serverclasses formed by splitting the original program. I don't think that is the best way to solve the problem in the long run -- switching to native mode would be better.