Problem solve Get help with specific problems with your technologies, process and projects.

What is the max memory addressable by COBOL?

What's the maximum memory that a single COBOL program can address?
Well, you don't specify a compiler or an operating system, or whether you are interested in LINKAGE SECTION, WORKING-STORAGE SECTION, LOCAL-STORAGE, FILE SECTION or all of them together. For IBM Enterprise COBOL on mainframes, the answers are in the "Compiler Limits" appendix of the Language Reference Manual.

The main limiting factor is which compiler (OS/VS COBOL only used 24-bit addresses) and operating system (31-bit mainframes can have 2 GBs of memory, or just over 2 billion) In Enterprise COBOL you could address 2 GBs of files or 2 GBs of WORKING-STORAGE, but you can't address 4 GBs at a time, since the system can't hold that many bytes for an AMODE 31 program.

There is no AMODE 64 COBOL on z/OS yet, and really no need for one, but we are looking at doing it anyway someday. There are many COBOL programs today that run just fine with AMODE 24, so they still have lots of room to expand and still be only AMODE 31. One thing we are looking at closely is expanding the size of a single data item from 16 million to 2 billion bytes; people would be able to use that right away for working with large XML documents.

Dig Deeper on IBM system z and mainframe systems