I start with RPGLE, and I am trying to determine if there is a way to simply define the parameters for the procedures in my service program once. I know that I can put prototypes inside a member of the copy (which I did), but then I still have to put the same code in the body of the procedure ("procedure interface").
My question is: is there any way to use the prototype to define 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 can just say "use a prototype" or something in the body of the procedure, or the compiler will find it myself ...
I donβt understand how to create prototypes and interfaces of procedures, or they actually repeat when executed 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
.