Hi Charles,

I've seen something like this only without recursion:

PGMA
----
PGM
DCL &FILE *CHAR 10
DCL &LIB *CHAR 10
DCL &MBR *CHAR 10

MAIN10:
OVRDBF FILE(ABC) TOFILE(&LIB/&FILE) MBR(&MBR)
CALL PGMB (&LIB &FILE &MBR)
IF COND(&LIB *NE '*END*') THEN(GOTO MAIN10)
ENDPGM

PGMB
----
fABC ip e k disk
d PGMB pr extpgm(PGMB)
d peLIB 10a
d peFILE 10a
d peMBR 10a

d PGMB pi
d peLIB 10a
d peFILE 10a
d peMBR 10a

/free
...do something...
if somecondition;
peLIB = '*END*';
else;
peLIB = 'FOO';
peFILE = 'BAR';
peMBR = 'XYZ';
endif;
*inLR = *on;
/end-free

*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
pdow@xxxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxxx> /



Charles St-Laurent wrote:
Hi!

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.

When I debug my RPG/ILE, nothing seems to happen at this line:
C CALL 'LSTWRDP' PLIST1

I believe that my call is not performed. Or, if it is performed, no update is made to my file by my second level call.

LSTWRDP calls LSTWRDR that calls LSTWRDP with different parameters to do new OVRDBF...

Am I missing something?

Charles



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.