ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

DIM limitations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DIM limitations

    When I am trying to load an array with 65535 elements I get this message when I am setting up my DIM. Is it safe to say that the limit for DIM = 32767. Is there anyway around it , other then loading multiple arrays.

    Thanks,

    DAC

    Message . . . . : A parameter for keyword DIM is not valid; defaults to 1.
    Cause . . . . . : A parameter for keyword DIM must be a numeric literal with
    a value between 1 and 32767 or a constant name representing a valid numeric
    literal.
    Recovery . . . : Specify valid values as parameters for the DIM keyword.
    Compile again.

  • #2
    Re: DIM limitations

    If it is that large, I would use a work file, referenced by record number.
    John McKay
    jmckay@mckaysoftware.ie
    http://www.rpglanguage.com

    Comment


    • #3
      Re: DIM limitations

      User space can be up to 64 MB, that could maybe fit your needs
      Philippe

      Comment


      • #4
        Re: DIM limitations

        Hi dcutaia:

        Have a look at this article.



        Page 4 suggests using pointers combined with "the C function bsearch" to replace the array and %lookup functions.

        Hope that helps
        GLS
        The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

        Comment


        • #5
          Re: DIM limitations

          another simple method is to make your array occuring.
          Regards

          Kit
          http://www.ecofitonline.com
          DeskfIT - ChangefIT - XrefIT
          ___________________________________
          There are only 3 kinds of people -
          Those that can count and those that can't.

          Comment

          Working...
          X