From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
--yea, but how does a *ENTRY module fit into that. You can do that and I have seen people doing it.
I just had to know, so tested this.
I created a module out of a *ENTRY PLIST program.
Then created the service program to export all.
Made a binding directory for the service program.
Then created an RPG program that bound to the binding directory and ran the procedure.
In this case, LR in the procedure did allow the service program close its files.
I also tested a DCL-PR EXTPGM/DCL-PI setup and had the same result.
So Alan is correct, *ENTRY modules do allow you to create a Service Program that relies on LR to close files.
This works because the Module creation generates the export procedure with same name as the module.
So there appears to be at least one way to generate a Service Program that uses the cycle.
I have never considered creating modules out of *ENTRY programs before.
So back to the original question about setting INLR on in a module of a service program..
It really would depend on how the modules are created.
Don't set LR if you always create service programs out of NOMAIN modules.
Most would always suggest creating service programs out of NOMAIN modules.
If you create modules out of cycle programs, then you could use INLR to close files. Or you could code you're closes yourself.
I imagine there are some performance differences with using NOMAIN modules vs Cycle Modules in a service program.
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.