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.

123 VOTE
Status Delivered
Workspace IBM i
Created by Guest
Created on Feb 14, 2013

RPG refactoring ability

Would like to be able to perform refactoring on RPG code similar to the refactoring Eclipse can do with C++.

Refactor > Rename
Refactor > Extract Local Variable
Refactor > Extract Constant
Refactor > Extract Function


Use Case:

Start with a program that uses an internal subprocedures named GetName. Realise we need a GetCustomerName and a GetProductName. Would like to change the name of GetName to GetCustomerName in preparation for adding the new function. Scan and replace requires two passes: the first one padded with the exact number of blanks so the P and D specification columns don't get shifted and then a second pass without padding to handle the function calls (who wants to see name = GetName (custID); ? Further, we'd also like to change 'name' to a CustName. Simple scan and replace is very tricky here, given the number of places 'name' is appended (CustomerName, VendorName, ProductName, LocationName, etc.)

Extract Local Variable is useful in the case where we've been using a function call and realise we've repeated the same function call with the same parameters multiple times. Replacing multiple function calls with a single local variable makes it easier to change the function call if needed and it adds easier debugging as a side benefit. Scan and replace works, but it's more programmer friendly to have the IDE restrict the change to the local scope.

Extract Constant is very useful for working with legacy code where magic numbers are sprinkled about willy-nilly.

Start with legacy code in a monolithic block. Want to extract out a slice of business logic as a subprocedure. Would select the code, Refactor > Extract Function and RDp would ask for the return value and PI. Then RDp would create a PR and a P...b / PI P...e block and move the code from the mainline into the PI block. Finally, RDp would replace the mainline code with a CALLP with the new subprocedure name and prompt for the parameters.


Idea priority Medium
  • Guest
    Reply
    |
    Jan 11, 2017

    This feature is now available as part of the IBM Rational Developer for i 9.5.1.1 Fix Pack.

    Product web page: http://www.ibm.com/software/products/us/en/dev-ibm-i
    Fix list: http://www.ibm.com/support/docview.wss?uid=swg27038481#9511
    Download doc: http://www.ibm.com/support/docview.wss?uid=swg24043183

  • Guest
    Reply
    |
    Dec 13, 2016

    The feature that is described in this request is a candidate for a future release.

  • Guest
    Reply
    |
    Dec 9, 2016

    This is a great requirement. However it is too large to deliver in one release. We will deliver the Rename support under this RFE and have opened 3 other RFEs to track the other possible refactorings. Please vote on them to provide feedback on the relative demand.
    - Extract Constant - http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=98365
    - Extract Local Variable - http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=98367
    - Extract Procedure - http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=98369

  • Guest
    Reply
    |
    Sep 14, 2015

    Due to processing by IBM, this request was reassigned to have the following updated attributes:
    Brand - Servers and Systems Software
    Product family - Programming Languages
    Product - Developer for Power Systems

    For recording keeping, the previous attributes were:
    Brand - Rational
    Product family - Design & development
    Product - Developer for Power Systems

  • Guest
    Reply
    |
    May 28, 2015

    This is great, just make sure that creating a new procedure uses free format declarations and calculations vs. the mixed variant specified in the request.

  • Guest
    Reply
    |
    May 13, 2013

    This RFE will be under consideration for a future release. Status has been updated to Uncommitted Candidate.

  • Guest
    Reply
    |
    Apr 25, 2013

    Wow, this would really help with coding efficiency. Not having to backtrack through the code and fix replacements would be so nice.

  • Guest
    Reply
    |
    Mar 8, 2013

    This RFE is consistent with our strategy and product roadmap and IBM is continuing to evaluate.

  • Guest
    Reply
    |
    Feb 19, 2013

    Support fully

  • Guest
    Reply
    |
    Feb 18, 2013

    I fully support this request!

  • Guest
    Reply
    |
    Feb 15, 2013

    It would be nice to add some of these features to CL, COBOL, DDS, etc., too.

  • Guest
    Reply
    |
    Feb 15, 2013

    Extract Function would be a major enhancement for refactoring legacy code.

  • Guest
    Reply
    |
    Feb 14, 2013

    I'd like all of what Buck said plus:
    - Rename of all instances of a variable as Buck's suggested;
    - Create Sub-Procedure from a typed line of code. That is if I typed:
    mySubProc(parm1 : parm2); and it didn't exist in the source member or included copy books that RDp would either create a sub-proc stub OR launch the sub-proc Wizard with some of the details part populated

  • Guest
    Reply
    |
    Feb 14, 2013

    I support what Buck wants with the REFRACTORING

  • Guest
    Reply
    |
    Feb 14, 2013

    I'd be happy just being able to rename a thing and only that thing (like right-click the outline, Rename).