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.

126 VOTE
Status Delivered
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on Jul 28, 2017

New built-in function %SPLIT.

The new built-in function %SPLIT can be used to extract an array of elements from a source string.


Use Case:

DCL-S myArray VARCHAR(255) DIM(255);
DCL-S myString VARCHAR(32767) INZ('a;b;c');
DCL-C MY_SEPARATOR ';';

myArray = %SPLIT(myString : MY_SEPARATOR);


Idea priority Low
  • Guest
    Reply
    |
    Apr 16, 2021

    For more information about the new %LOWER and %UPPER built-in function, see https://www.ibm.com/support/pages/node/6442065

  • Guest
    Reply
    |
    Apr 16, 2021

    IBM believes that the request described has been solved and is available with PTFs for 7.3 and 7.4.

    7.3
    ILE RPG runtime: SI76098 - you need this PTF on any 7.3 system where you run a program with %SPLIT
    ILE RPG compiler: SI76100

    7.4
    ILE RPG runtime: SI76099 - you need this PTF on any 7.4 system where you run a program with %SPLIT
    ILE RPG compiler: SI76101
    ILE RPG compiler for TGTRLS(V7R3M): SI76109

    For more information about the new %SPLIT built-in function, see https://www.ibm.com/support/pages/node/6442065

  • Guest
    Reply
    |
    Apr 13, 2021

    IBM agrees with the request and a solution will be available in the future.

    For more information about %SPLIT, see https://www.ibm.com/support/pages/node/6442065.

  • Guest
    Reply
    |
    Apr 17, 2020

    This request is still a candidate to be an enhancement for the RPG compiler.

  • Guest
    Reply
    |
    Feb 17, 2020

    The COMMON Europe Advisory Council (CEAC) has reviewed this requirement and recommends that IBM view this as a MEDIUM priority requirement that should be addressed.

    Instead of using numerous workarounds it would be great if the %split function would be built into RPG. This would also help to keep RPG modern on the platform.

    Background: The CEAC members have a broad range of experience in working with small and medium-sized IBM i customers. CEAC has a crucial role in working with IBM i development to help assess the value and impact of individual RFEs on the broader IBM i community and has therefore reviewed your RFE.

    To find out how CEAC help to shape the future of IBM i, see CEAC @ ibm.biz/BdYSYj and the article "The Five Hottest IBM i RFEs Of The Quarter" at ibm.biz/BdYSZT

    Therese Eaton – CEAC Program Manager, IBM

  • Guest
    Reply
    |
    Jul 4, 2019

    Hi,
    maybe the new "SYSTOOLS.SPLIT() - UDTF" (v7r3) could help:
    Also the newly available dynamic arrays (v7r4) could help adjust the array size

    example:
    dcl-ds parts dim(5) qualified;
    part char(20) inz('');
    end-ds;

    dcl-s selval char(10);

    dcl-s idx uns(5) inz(0);

    exec sql
    declare c1 cursor for
    select cast(element as char(10))
    from table(SYSTOOLS.SPLIT('12;12345;Test', ';')) ;
    exec sql
    open c1;

    exec sql
    fetch C1 into :selval;

    dow SQLCOD=0;
    idx += 1;
    parts(idx).part = selval;
    exec sql
    fetch C1 into :selval;
    enddo;

    exec sql
    close C1;

  • Guest
    Reply
    |
    Jul 3, 2019

    COBOL/400 was mentioned -- which I am unfamiliar with. However, other IBM COBOL dialects support UNSTRING and STRING for their split/parse/join/concatenate functions.

    Otherwise, yes, I would like to see something like %split/%join implemented in RPG. However, for a split-type delimiter parameter, a REGEX pattern would also be nice.

  • Guest
    Reply
    |
    Jul 3, 2019

    I consider the split function to be an standard programming tool, and I'm always disappointed when I'm reminded the hard way that RPG doesn't include it.

  • Guest
    Reply
    |
    Sep 6, 2018

    I use this function in other languages and would love to see it in added to the list of BIF's. I have needed this function many time and had to do work arounds that cost me time. Adding this brings more validation to the developer languages of the IBM i.

  • Guest
    Reply
    |
    May 29, 2018

    What would be good with this RFE is a BIF that is the opposite function too. Something like %COMBINE. Where it would read an array and then produce a string with a separator that you could supply as a Parm.

    Jason

  • Guest
    Reply
    |
    May 19, 2018

    I would love to have this feature in RPG. I use it in many other languages and have found it a great feature. Please consider this as a must for RPG.

    THanks

    Hoss

  • Guest
    Reply
    |
    Apr 19, 2018

    @stpmey, if you have a similar requirement for ILE COBOL, you should open a separate RFE. The RFE component for ILE COBOL is "Languages - Other". (Servers and Systems Software > Power Systems > IBM i > Languages - Other)

  • Guest
    Reply
    |
    Apr 19, 2018

    Not only for RPG but also for ILE Cobol

  • Guest
    Reply
    |
    Apr 12, 2018

    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.

  • Guest
    Reply
    |
    Mar 7, 2018

    This would be very helpful. The LOCATE function is too cumbersome.

  • Guest
    Reply
    |
    Feb 27, 2018

    The CAAC has reviewed this requirement and recommends that IBM view this as a “nice to have” low priority feature. This can be done by any developer, using the %SCAN BIF or the fixed form SCAN opcode. Nevertheless, it would be much easier to have this BIF.

    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 RFEs on the broader IBM i community, and has therefore reviewed your RFE.

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

    For more details about CAAC's role with RFEs, see http://www.ibmsystemsmag.com/Blogs/i-Can/May-2017/COMMON-Americas-Advisory-Council-%28CAAC%29-and-RFEs/

    Nancy Uthke-Schmucki - CAAC Program Manager

  • Guest
    Reply
    |
    Jan 15, 2018

    IBM has received the requirement and is evaluating it. IBM will provide a response after evaluation is complete.

  • Guest
    Reply
    |
    Sep 25, 2017

    Due to processing by IBM, this request was reassigned to have the following updated attributes:
    Brand - Servers and Systems Software
    Product family - Power Systems
    Product - IBM i
    Component - Languages - RPG
    Operating system - IBM i
    Source - None

    For recording keeping, the previous attributes were:
    Brand - Servers and Systems Software
    Product family - Power Systems
    Product - IBM i
    Component - Application Development
    Operating system - IBM i
    Source - None

  • Guest
    Reply
    |
    Jul 31, 2017

    Please compiler team, don't implement this. This can be done by every developer by themselves. Please concern yourself with the tasks which cannot be done by us developers but only by the compiler team, for example reflection on data structures (determining the structure of a ds at runtime).

  • Guest
    Reply
    |
    Jul 29, 2017

    I like the basic idea - but not the name. Split just doesn't do it for me. PHP uses Explode when there is a separator involved and that seems a better name to me.