Top Contributors

Recursion in RPGLE (No Activation group no transfer control needed)

Hi all,
Best Wishes
These are RPGILE programs.

=> Pgm1 calls Pgm2

=> Pgm2 calls Pgm3.

Now, I need to call Pgm2 (already in stack) inside Pgm3. But failing due to recursive call. I cant change the Activation group to *New .

Can I somehow remove the Pgm2 from Call stack (I am sure there will be no impact if we remove pgm2 from stack. Pgm2 is no longer required as soon as
Pgm3 is Called).

Due to existing code (10,000+ lines) complexities I cant re-structure all in to Procedures due to various reasons.  

Please help me / Guide me. Thanks in advance.

Rank: Ace

Expert Comment

Gary Patterson2017-02-24 05:38 AMID: 1974188
Hi Kashual,

Looks like you are new to Experts Exchange.  Welcome!  Please post a question.  This area is for general discussions about IBMi, iSeries, and AS/400.


Gary Patterson
Rank: Sage

Expert Comment

Kyle Santos2017-02-24 09:37 AMID: 1974259
Hi Kaushal,

As Gary recommended, that is the best route in finding an answer to your question.  Go here to do this.