There is a way to call a program that is already on the program stack. But it is not a recommended method since...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
it is resource intensive. It simply involves creating the program as an ILE program with the attribute of *NEW for activation group. Each call of the program will create a new activation group (the expensive part) but you can have a program call itself. I would not recommend this with anything that must do many calls before deciding to end. I've used this technique only to process program-references files that we rebuild nightly. A utility program we use will perform a implosion/explosion on a given programs usages (who calls it, the implosion, and what it calls, the explosion.)
Point is, this use of a program that calls itself by creating a new activation group won't be creating umpteen-zillion activations, only 5-6 on average, maybe as high as 10-15 to display the usages of some our programs. So there really isn't a lot of expense. 'Course it does help to have a max'd out 820 system.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.