"WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx> wrote on 11/30/2017 01:57:53 PM:
Everyone here seems to be in favor of using /INCLUDE to bring
service program prototypes into program source members. The
disagreement is whether those prototypes should be in the service
program source itself or a separate source member containing only
the prototypes (what I call header files).
We currently place all of a particular service program's
prototypes, templates, and related constants in their own (single)
copybook and INCLUDE it in both the service program and the calling
programs.
The only complaint we get with that, around here, is if a service
program has, say, 100 service procedures in it and the caller is only
using one of those service procedures then the programmer doesn't like
having to INLCUDE all 100 prototypes along with their templates and
related constants. Their issue is that even if they compile with the
*NOUNREF keyword they still get a larger compiled object than if they only
hardcode just what they need for that one service procedure.
As for the issue of whether those prototypes should only exist in
the service program (no separate copybook)... I'd be in favor of that is
there were a compiler directive to extract just the prototype(s),
template(s), and constant(s) needed by the caller. From the talk, there
seems to be such a thing. What is it? Or is this just a tricky way of
inserting compiler directives into the service program source that allows
the caller to use additional compiler directives to selectively extract
source when you INCLUDE the actual service program's entire source?
Sincerely,
Dave Clark
As an Amazon Associate we earn from qualifying purchases.