/Copy for PI and PR statements
Hi all. I need some expert advice on procedures. From what I have read we have to have a PI statment in a (sub)procedure and a PR statement with the same parms in the calling program (Main procedure?) I have also seen suggestions to use /Copy to replicate these in the code.
My question is this: If I create a member to be used by the /Copy that only has the parameters listed, no PI or PR line in it. Then can I code just a PR line in the main procedure followed by /Copy to get the parms in there and in the subprocedure just code a PI line followed by the /Copy?
I would like to do this so if the parms should change for any reason I can just change them in the copy member and recompile anything using them instead of having to go into each procedure and change them. I am new to procedures so it is all still a little fuzzy to me but this seems to make sense from a maintenance standpoint.
Hi all. I need some expert advice on procedures. From what I have read we have to have a PI statment in a (sub)procedure and a PR statement with the same parms in the calling program (Main procedure?) I have also seen suggestions to use /Copy to replicate these in the code.
My question is this: If I create a member to be used by the /Copy that only has the parameters listed, no PI or PR line in it. Then can I code just a PR line in the main procedure followed by /Copy to get the parms in there and in the subprocedure just code a PI line followed by the /Copy?
I would like to do this so if the parms should change for any reason I can just change them in the copy member and recompile anything using them instead of having to go into each procedure and change them. I am new to procedures so it is all still a little fuzzy to me but this seems to make sense from a maintenance standpoint.
Comment