It is an activation group issue. Unless you are making many repetitive calls to the CL, I see no reason why you should use CLLE, as opposed to CLP. Dave
It is an activation group issue. Unless you are making many repetitive calls to the CL, I see no reason why you should use CLLE, as opposed to CLP. Dave
Perhaps use of ovrscope would help?
I have a clp doing an ovrprtf qsysprt hold(*yes) prior to running a report program for emailing. When I compile this as a *mod, then use callb from my (bound) interactive rpg to access it, it does not hold the print file. This in turn means it's not there to perform the email steps. When I compile it as a *pgm, then use call to access it from the same rpg, it does hold the print file. Any suggestions? Maybe a caller level or activation group issue?
When you're doing the OVRPRTF in your CL module, you're running in an activation group. When your CL module does the CALLB, the RPG program is running in a different activation group, and the override does not apply to this new activation group. The problem arises because the "Override scope" default for the OVRPRTF command is *ACTGRPDFN. Prompt the command, and you can read about the OVRSCOPE parameter. If you change the OVRSCOPE on your OVRPRTF command to *JOB, you'll be OK. If you do a DLTOVR, you will also have to change it there, or you'll get an error on the DLTOVR. On the DLTOVR, you'll see that the parameter to change is the LVL parameter. Bruce