COBOL

COBOL

COBOL

COBOL is responsible for the efficient, reliable, secure, and unseen day-to-day operations of the world's economy.

 View Only
  • 1.  Maximum size of data in Linkage Section

    Posted Tue February 27, 2024 01:27 PM

    Hi,

    please, can anyone tell me the maximum size of data passed in linkage section?



    ------------------------------
    Fabiano Garske
    ------------------------------


  • 2.  RE: Maximum size of data in Linkage Section

    Posted Tue February 27, 2024 01:43 PM

    From Appendix B of the Enterprise COBOL Programming Guide, the linkage section in total can be 2,147,483,646 bytes under LP(32) and up to the available addressing capacity of the machine under LP(64).

    A single data item under any section in the DATA DIVISION can be 999,999,999 bytes under LP(32) and 2,147,483,646 bytes under LP(64). So while you could potentially pass in a single item whose size is more than 999,999,999 bytes under LP(32) - from a program written in a different language, for example - COBOL would only support the first 999,999 bytes of it.



    ------------------------------
    Mike Chase
    Enterprise COBOL Developer
    mike.chase@ca.ibm.com
    ------------------------------



  • 3.  RE: Maximum size of data in Linkage Section

    Posted Tue February 27, 2024 02:42 PM

    Hello Mike,

    Thanks a lot for your reply.



    ------------------------------
    Fabiano Garske
    ------------------------------



  • 4.  RE: Maximum size of data in Linkage Section

    Posted Wed February 28, 2024 06:35 AM

    While there are maximum sizes the compiler is able to generate code for, don't forget that your LP(32) application code and all still needs to fit into the typical 1.2G address space. 



    ------------------------------
    Bernie Rataj
    Technical Support Professional
    IBM Canada Ltd.
    Markham ON Canada

    https://www.ibm.com/products/cobol-compiler-zos
    https://www.ibm.com/products/pli-compiler-zos
    ------------------------------