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 Not under consideration
Workspace IBM i
Created by Guest
Created on Feb 25, 2021

Implement SST or SUBSTR in RPG IV Built-in Functions

Since integration with SQL is pervasive in RPG IV, it would be beneficial (particularly with new-hires) to have RPG support consistent components with SQL.
To that end, the SQL language uses SUBSTR or SUBSTRING for the Substring function, while CL uses %SST or %SUBSTRING.

RPG on the other had, uses a legacy-limited %SUBST() which was named based on the limit of 5-character Operation Codes in RPGIII.
Muscle memory comes into play here and %SUBSTR() is nearly always typed for me, but %SST() would also be wonderful. #AnythingButSUBST is what I'm thinking here. So the request is to add either %SUBSTR() or %SST() to the RPG IV language as a built-in function.


Use Case:

While coding in RPG IV, particularly using the RDi environment, typing %SUBSTR is accepted but gives you a compilers error because it is NOT part of RPG. It is a similar name to what SQL uses.
If we are coding Embedded SQL in RPG IV, we have to code this:
EXEC SQL SELECT SUBSTR(ZIPCODE, 1,5) FROM ...
But in RPG IV immediately following that SQL code, we'd have to code this:
IF (%SUBST(ZIPCODE:1:5) = '60639');


Idea priority Medium
  • Guest
    Reply
    |
    Mar 1, 2021

    IBM does not intend to provide a solution to this request at this time, so it is being closed.

    Synonyms for keywords, built-in functions, and operation codes will not be introduced to the RPG language.

  • Guest
    Reply
    |
    Feb 26, 2021

    It has always been SUBST so the most logical choice is %SubSt... otherwise we can request to call it %Mid as well.

    Each language has its specific instructions... that's part of learning the language syntax.

  • Guest
    Reply
    |
    Feb 26, 2021

    I agree with this. It is really annoying with these different names for the same.
    I have the problem with %EDITC() versus the DDS keyword EDTCDE.
    How many times haven't I written %EDTCDE()…...