• 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_dsSTGMDL(*TERRASPACE)
    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