Skip to Main Content
IBM Power Ideas Portal


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).


Shape the future of IBM!

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:

Search existing ideas

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 your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

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.

Status Future consideration
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on Mar 9, 2023

Add "Deprecated" as a special keyword to procedures

Deprecation is something that is not something that RPG developers would be familiar with, however open source developers are. When you no longer need a method or when you dont want someone to use a method that is out there, you deprecate the method.
can we add a keyword to RPG procedures that will throw a warning to the compiler (and in turn to the IDE) that says that this method is deprecated. Very similar to how if you use a deprecated method in lets say Java, you get a warning that it has been deprecated.


I am thinking something along the lines of

dcl-proc applySubsidy export deprecated;

dcl-pi applySubsidy dim(1) likeds(subsidyCalculations);

batchNumber packed( 3 ) value;

invoice packed( 7 ) value;

subsidyLimit packed( 7 ) value;

end-Pi;

//logic...

end=proc;

The only way to handle this today which is not a true deprecation is to remove the export. Which only makes the method an private method. Developers still could in theory use it in that particular service program.

Idea priority Medium
  • Guest
    Reply
    |
    Mar 18, 2024

    I just rename my procedure and export as MyFunction_DEPRECATED so that existing programs can still use it, however when recompiling they get an error that MyFunction no longer exists. If they're smart and look in the list of prototypes they can of course see that it still exists (and even use it which is a drawback).

  • Guest
    Reply
    |
    Mar 31, 2023

    Having the *DEPRECATED value for the EXPORT keyword would mean that only the module containing the procedure would know it was deprecated. It would be impossible for the compiler to issue the warning or error when compiling a call from a different module.

    Having multiple versions of a prototype isn't ideal in general since it makes it difficult to make any change to the procedure. Also, it defeats one purpose of a prototype which is to ensure that the callers have the same idea about the parameters as the procedure itself. If a shop has multiple copies of a prototype, and they wanted to add the DEPRECATED keyword to the prototypes, they could combine that change with an exercise to replace all the various prototypes with a /COPY to pick up the one single prototype.

    - Barbara Morris

  • Guest
    Reply
    |
    Mar 30, 2023

    I'm leery of having a keyword on DCL-PR, because there are shops out there that may have numerous prototypes for a procedure all over the place. You would need to find and go into all those programs and copybooks and put on the DEPRECATED keyword to every occurence of a prototype.


    Would it work better if this was implemented as an option to the EXPORT keyword?

    Something like EXPORT(*DEPRECATED) ?


    This way, I don't need to worry about any prototypes.

  • Admin
    Maria del Carmen Ruvalcaba Cevallos
    Reply
    |
    Mar 14, 2023

    The CAAC has reviewed this IBM Idea and recommends that IBM view this as a medium priority Idea that should be addressed.

    This would be extremely valuable to the new programmers entering the community who would expect this feature to be available.

    Background: The COMMON Americas Advisory Council (CAAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CAAC has a key role in working with IBM i development to help assess the value and impact of individual IBM Ideas on the broader IBM i community and has therefore reviewed your Idea.


    For more information about CAAC, see www.common.org/caac


    Carmelita Ruvalcaba- CAAC Program Manager

  • Guest
    Reply
    |
    Mar 10, 2023
    IBM will use this Idea as input to planning, but no commitment is made or implied. This Idea 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 Idea.

    If this is implemented, the DEPRECATED keyword would be a keyword for the prototype. Normally, prototype keywords are repeated for the procedure interface, and the compiler checks that the keyword is the same for both DCL-PR and DCL-PI. But in this case, the DEPRECATED keyword might fit better on the DCL-PROC itself, and then the compiler would verify that the DCL-PR (if it existed) would have the same setting as the DCL-PROC.

    If this is implemented, there might also be a CTL-OPT option, and possibly a command parameter, to allow programmers to control the level of diagnostic message they get from the compiler. It might be similer to the way the REQPREXP command parameter and CTL-OPT keyword work, something like DEPRECATED(*ALLOW | *WARN | *NOALLOW), where it would probably default to *WARN.

    - IBM Power Systems Development
    1 reply
  • Guest
    Reply
    |
    Mar 9, 2023

    Would it be better if the DEPRECATED keyword was on the prototype? If it is just on the procedure, callers in other modules wouldn't be able to get the warning.

    - Barbara Morris

    1 reply