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 Delivered
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on May 7, 2020

Escape the delimiter when using systools.split

Enhance the systools.split function to escape the delimiter.


Use Case:

systools.split is an awesome function. The only limitation is that we are not able to escape any possible delimiters in the data we are splitting.

For Example, if I run
SELECT element
FROM
TABLE (
systools.split(input_list => 'ANHE,AW',
delimiter => ',')
) b
;
I get ANHE and AW as the two rows of data.

if I run
SELECT element
FROM
TABLE (
systools.split(input_list => 'AN,HE,AW',
delimiter => ',')
) b
;
Then I get AN, HE, AW.
In this particular case, ANHE is all one word. the comma was used two abbreviate the word. I would like to escape the comma between AN and HE and it return ANHE, AW.
For example

SELECT element
FROM
TABLE (
systools.split(input_list => 'AN/,HE,AW',
delimiter => ',')
) b
;
This would return ANHE, AW.


Idea priority Medium
  • Guest
    Reply
    |
    Nov 13, 2020

    The SYTOOLS.SPLIT table function was enhanced to add an ESCAPE parameter. This was delivered in fall 2020 with IBM i 7.4 PTF Group level 10 and IBM i 7.3 PTF Group level 22.

  • Guest
    Reply
    |
    Jun 3, 2020

    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.

  • Guest
    Reply
    |
    May 8, 2020

    The code for SPLIT is available on the system, and I recall it was also posted online as it isn't that sophisticated.
    Therefore, adding a 3rd parameter (Escape symbol) and then adapting the code to taste is something that could be done today. IBM should still do this, so that everyone can enjoy it, but you could easily add that capablity yourself.

  • Guest
    Reply
    |
    May 8, 2020

    agreed this function is very useful, but a few small tweaks to it would make it even better.

    just yesterday i wanted to use it to split a string at a specific length but it doesn't currently support that. something like this would be useful: https://www.php.net/manual/en/function.str-split.php

    for your case instead of adding the escape character, can you replace the comma with another character (like ^), then run split, then put ^ back to a ,. I know it's a workaround, but might help for what you're trying to accomplish.