This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
I've referenced this idea in an idea I submitted: Typed pointers in RPG: Stronger type safety for pointers. I consider prototype templates as a prerequisite for typed procedure pointers. In particular, for typed procedure pointers, I also consider allowing TEMPLATE on prototypes as a prerequisite.
Similar to how it works on data structure definitions and standalone field definitions, TEMPLATE on prototypes would declare a prototype that can be referenced in the LIKEPR/LIKEPROC keyword on another prototype (or typed procedure pointers), but can't be called itself and can't have its address taken (i.e., %PADDR on a prototype template would be invalid). The EXTPGM and EXTPROC keywords would be incompatible with TEMPLATE. TEMPLATE wouldn't be allowed on procedure interfaces.
Conversely, prototypes and procedure interfaces declared with LIKEPR/LIKEPROC would allow EXTPGM or EXTPROC, but most (all?) other keywords would be disallowed. Prototypes and procedure interfaces declared with LIKEPR/LIKEPROC wouldn't allow parameter specifications, and wouldn't need an END-PR/END-PI (similar to how END-DS isn't needed when LIKEDS is used on a data structure).
(I'm not sure how the STATIC keyword should be handled, given that it only applies to Java methods. Perhaps the solution is to simply disallow LIKEPR/LIKEPROC combined with EXTPROC(*JAVA), then STATIC wouldn't make sense on prototype templates and would also be disallowed.)
IBM will use this request as input to planning but no commitment is made or implied. This request will be updated in the future if IBM implements it. IBM will use votes and comments from others in the community to help prioritize this request.
IBM has received the requirement and is evaluating it. IBM will provide a response after evaluation is complete.
If this is implemented, the most likely mechanism would be to add a LIKEPR keyword as suggested in the comments, and possibly also a TEMPLATE keyword as suggested in the description.
The issue is that the Procedure interface on the callback can't use the prototype because a procedure can't be defined for a prototype when ExtProc is being used. The actual message is RNF1505 A procedure cannot be defined when the prototype specifies EXTPROC(variable) or EXTPGM. Maybe the real fix is to allow a procedure to be defined when the prototype specifies ExtProc(variable).
This could be done without creating a template, by simply allowing me to define a procedure with LikePR which would allow me to include ExtProc() with a reference to a procedure pointer. On the procedure interface side of things, I could define that LikePR and not have to define the parameters a second time.