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.

118 VOTE
Status Delivered
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on Jun 28, 2016

For RPG extend array capabilities

Extend arrays and data-structure arrays to be really dynamic without having to use base pointer and memory allocation.
Without having to give number of max elements in dim(), e.g. dim(*varying) or dim(*dynamic) or dim(*automatic).
Provide functionality for:
- insert element(s) at a given position e.g. *start, *end, *after/*before index position with automatic resizing
- delete element at a given position e.g. *first, *last, index position with automatic resizing
- retrieve number of elements


Use Case:

Provide functionality for:
- insert element(s) at a given position e.g. *start, *end, *after/*before index position
- delete element at a given position e.g. *first, *last, index position
- retrieve number of elements
- automatic resizing


Idea priority High
  • Guest
    Reply
    |
    Jun 20, 2019

    Support for varying-dimension arrays is available with the 7.4 release of the ILE RPG compiler.

    There are two types of varying-dimension arrays:
    1. An array defined with DIM(*VAR:maxElems) where the RPG programmer must explicitly set the number of array elements (to a greater or smaller number) using %ELEM.
    2. An array defined with DIM(*AUTO:maxElems) where the number of elements in the array will automatically be increased if an assignment is made to an element greater than the current number of elements in the erray. The RPG programmer can also explicitly set the number of elements in the array (to a greater or smaller number), using %ELEM. For an array defined with DIM(*AUTO), the RPG programmer can use *NEXT as the index for an assignment to a DIM(*AUTO) array. The number of elements will increase by one, and the value will be assigned to the new element.

    For more information, see the "Varying-dimension arrays" section in the 7.4 version of the ILE RPG Reference. https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzasd/vardimarray.htm.

    Note that this enhancement does not include all the features requested by this RFE:
    - The RPG programmer must define the maximum number of elements in the array
    - There is no support for inserting elements at a given position
    - There is no support for deleting elements at a given position

    Additional RFE's must be created to address the requested features that were not provided by this enhancement.

  • Guest
    Reply
    |
    Jan 3, 2019

    IBM agrees with the request and a solution appears to be desirable and feasible. IBM intends to provide a solution. However, IBM's plans may change and no commitment is made that a solution will be provided.

    Note that if this feature is implemented, the requested features of inserting or deleting elements at a given position will not be provided.

  • Guest
    Reply
    |
    Nov 30, 2017

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

    We don't know how much effort it would be to implement, but it would be a very useful "nice to have".

    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/

    Dawn May - CAAC Program Manager

  • Guest
    Reply
    |
    Apr 26, 2017

    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
    |
    Nov 15, 2016

    This functionality should also apply to nested arrays. So that the nested array could also be *dynamic.

  • Guest
    Reply
    |
    Aug 22, 2016

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

  • Guest
    Reply
    |
    Aug 22, 2016

    Reply to SRinStL314's comment of 18 Jul 2016: I don't think RPG will have the notion of a deleted element in an array. So I think this could only work if adding a new entry at position 6 would push current elements 6+ down. And removing element 6 would push elements 7+ up. If the array is already full, attempting to add a new element anywhere in the array would cause an exception.

  • Guest
    Reply
    |
    Jul 18, 2016

    How should your dynamic array function if you add a data element *Before/*After an index entry and an entry already exists there? For example, I have a dynamic list of 10 elements that I'll be populating and have filled all of them. I then want to add an element after position 6. Should the process throw an error because the entry already exists? Should the process replace the existing entry? Should the process extend the array, pushing all elements down the stack? Or are you expecting those should be different options based on keywords provided within the definition? If you have to decide those up front, how do you handle the boundaries and limitations within the "dynamic" function?

  • Guest
    Reply
    |
    Jun 29, 2016

    Creating a new RFE based on Community RFE #90712 in product IBM i.