IBM Z and LinuxONE Languages

Languages

Languages

Broad range of supported development languages and tools allows to transform software delivery practices.


#Servers
 View Only
  • 1.  OCCURS DEPENDING ON with "UNBOUNDED"

    Posted 03/25/20 06:00 AM
    Edited by Dan Zhang 06/01/20 10:53 PM

    Disclaimer: This post is migrated from the COBOL forum on IBM developerworks that is no longer in use. Its original author is LeoncioCarvalho, posted on Sep 6, 2016.

    I have a problem with an internal table that time after time is overloaded.

    The amount of items is about 1.5M.

    That is the general overview, ok?

     

    Well, I'm thinking to use the option "UNBOUNDED" in the OCCURS but this option is only allowed in the linkage section.

     

    1 - Is there any problem about using a linkage section to store (and use)  such a table?

    2 - I know that the linkage area is quite different from working-storage, but in this case is there any problem?

     

    Thank you!

     

    £eo



    ---------------------------------------------------------
    Question asked by LeoncioCarvalho on Sep 6, 2016
    ---------------------------------------------------------


  • 2.  RE: OCCURS DEPENDING ON with "UNBOUNDED"

    Posted 03/25/20 06:08 AM
    Hi Leo,

    There is no problem with using the linkage section to store and use such a table; this is exactly the way to do it. See the section titled, "Working with unbounded tables and groups" in the V6.1 programming guide; I believe there's also an example.

    1.5 MB isn't a large table by any standard. The maximum size of an 01-level data item in Enterprise COBOL V5.2 is 999,999,999 bytes, which is roughly 954 MB.

    Unless the size of the table is relatively small, you might also be able to use an OCCURS DEPENDING ON clause with a high-enough maximum size, if that suits your needs more.


    ------------------------------
    Dan Zhang
    Content Designer for IBM COBOL Compilers
    ------------------------------