My RPGLE program call stack is as follows -
RPGLE PGM1 calls RPGLE PGM2 which calls RPGLE PGM3
Pgm1 overrides a file to library1
Pgm3 uses the same override
Now, in my Pgm2, I want to override the same file to library2, and then delete the override after Pgm3 call is completed from Pgm2. Upon completion of my call in Pgm2, override will revert back to library1 (basically, I want to do overriding on top of another overriding)
Current call stack in pgm2:
Call pgm3 // Pgm3 uses override defined in Pgm1 which is based on library1
Expected call stack in pgm2:
OVRDBF ***********
Call Pgm3 // Pgm3 should use override based on library2 rather than library1 that was specified in pgm1 pgm1
DLTOVR *********** // After this is completed, the only override that should remain, is the initial one based on library1
I defined OVRDBF as below (called by QCMDEXC) but doesn't seem to work.
OVRDBF FILE(FILE1) TOFILE(LIBRARY2/FILE1) SHARE(*YES) OVRSCOPE(*CALLLVL)
RPGLE PGM1 calls RPGLE PGM2 which calls RPGLE PGM3
Pgm1 overrides a file to library1
Pgm3 uses the same override
Now, in my Pgm2, I want to override the same file to library2, and then delete the override after Pgm3 call is completed from Pgm2. Upon completion of my call in Pgm2, override will revert back to library1 (basically, I want to do overriding on top of another overriding)
Current call stack in pgm2:
Call pgm3 // Pgm3 uses override defined in Pgm1 which is based on library1
Expected call stack in pgm2:
OVRDBF ***********
Call Pgm3 // Pgm3 should use override based on library2 rather than library1 that was specified in pgm1 pgm1
DLTOVR *********** // After this is completed, the only override that should remain, is the initial one based on library1
I defined OVRDBF as below (called by QCMDEXC) but doesn't seem to work.
OVRDBF FILE(FILE1) TOFILE(LIBRARY2/FILE1) SHARE(*YES) OVRSCOPE(*CALLLVL)
Comment