× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




I try to develop a program that call itself recursively. I compiled
it with DFTACTGRP(*NO) ACTGRP(*NEW). When I call my program
recursively, I call the CLP that does the OVRDBF. Then, in my CLP, I
call my RPG/ILE program back with my new OVRDBF.

I'm very confused by this scenario. Where exactly is the CLP (OPM CL?!) being called? You say that the RPG program is calling ITSELF recursively, that would imply that it's never calling the CLP, right, since it's calling itself?

Also, since each new call to the RPG is generating a new activation group, you need to tell us how you handled the override scoping. What do you have for the OVRSCOPE parameter on OVRDBF?

Also, remember that in a call-stack model, higher-level overrides take precedence over lower-level overrides. If you're using call-stack scoping, that means that only the first override matters, and the recursive ones will have no effect unless they specify SECURE(*YES).

You're doing a lot of things that I would never do:

a) Recursive calling of a program (as opposed to a procedure) is something I'd never do. The performance is awful, the stack is limited, and there's really no reason to do it.

b) Using CALL/PLIST instead of a prototype.

c) Also, there are good and bad reasons to use OVRDBF. I have to wonder why you're using it?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.