• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Automatic Storage Overflow Error

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

  • Automatic Storage Overflow Error

    When our controller program invokes the Valence subprocedure vvIn_ds in *SRVPGM VVSRVPGM (Module VVIN) we get the MCH4429 – Automatic storage overflow error.

    Note: We have adapted an existing controller program which runs without issue on Valence 3.2 at V5R4 to work with Valence 5.1 at V6R1 simply by adding the following statement to our code and compiling the controller program at V6R1.

    /define isVVOUT

    Is there anything else we should be doing to upgrade our Valence 3.2 controllers to 5.1 controllers?

    Do CNX have a version compiled version of VVSRVPGM that is compiled with STGMDL(*TERRASPACE) that we could try?


    We are currently experiencing this issue with only one of our controllers at the minute, the others appear to be ok.

    I’ve attached a Word document which provides detail of our investigation.
    Attached Files

  • #2
    For the benefit of any forum readers encountering a similar condition, this problem was resolved over a web meeting...

    It turns out the CGI job was running out of memory because the calling program had a massive amount allocated, courtesy of a large data structure array defined with DIM(9999). With that much memory reserved, it was pushing right up against the limitations of single level storage (16MB total for all open procedures in the call stack at any given time), so ultimately the attempt to use VVIN_DS put it over the top, resulting in the storage overflow error.

    The solution was to simply reduce the size of that one array in their program, as 9999 x (just about anything) tends to be a huge number!

    FYI, For Valence 5.0 and above, VVSRVPGM gets a storage model of *INHERIT for IBM i 7.1 and higher builds, otherwise it gets *SNGLVL. This way the service program adopts whatever storage model is being used by the calling program. The default storage model on the RPG compile command is *SNGLVL, so this doesn't make a difference for most sites. But if someone really needs to access a ton of memory in one of their programs and wants to use teraspace storage via STGMDL(*TERASPACE), this is supported.
    Last edited by robert.swanson; 05-25-2018, 07:55 AM.

    Comment

    Working...
    X