I am getting started with RPGLE and I am trying to determine if there is any way of just defining the parameters for the procedures in my service program once. I know I can put the prototypes inside a copy member (which I have done), but then I still have to put essentially the same code into the body of the procedure (the "procedure interface").
My question is, is there some way of using the prototype to define the parameters in the procedure interface (or vice versa)?
Ideally, something like:
Prototype:
D buildForm PR
D formType 10A CONST
D mode 4A CONST
Procedure:
P buildForm B
D buildForm PI
D formType LIKE(formType)
D mode LIKE(mode)
Well, ideally I would just be able to say 'use prototype' or something in the body of the procedure, or the compiler would find it on its own...
Am I misunderstanding how Prototypes and Procedure Interfaces need to be set up, or are they actually this repetitive when done correctly:
Prototype:
D buildForm PR
D formType 10A CONST
D mode 4A CONST
Procedure:
P buildForm B
D buildForm PI
D formType 10A CONST
D mode 4A CONST
Thanks for reading.