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
Categories Languages - RPG
Created by Guest
Created on Mar 28, 2017

Allow to sort a subfile as simple as sorting an Array DS

I have written numerous programs to sort subfiles, but if RPG implemetns it it would save code, standarize the code, and make the use of RPG more of a pleasure.


Use Case:

SORTSFL (mysfl:mycolumn1(*ASC);mycolumn2(*DESC))


Idea priority Medium
  • Guest
    Reply
    |
    Apr 29, 2020

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

    The ILE RPG compiler team has quite a long list of higher priority requirements, so this request is not likely to be implemented anytime soon.

  • Guest
    Reply
    |
    May 8, 2018

    If this request will be accepted, multi-page subfiles will have a major advantage over single page-subfiles, and the request to lift the limit of 9999 line subfile will be even more improtant.

    Request to lift the 9999 line subfile limit:
    https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=102956

  • Guest
    Reply
    |
    Aug 25, 2017

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

  • Guest
    Reply
    |
    Jun 13, 2017

    From the eight steps I missed one more important step: If there are any indicators on the SFL (to define DSP and color attributes etc), they will not be defined automatically to the SFL DS, since *IN01-*IN99 is not a valid RPG variable name. They need to be redefined as ordinary variables, copied from the indicators to the variables, and after sorting copy them back to the SFL.

  • Guest
    Reply
    |
    Jun 13, 2017

    To flic: This is what i am already doing,

    But it has some extra coding:

    1. Define a DS that will be the same as the SFL, using EXTNAME.
    2. If there are indicators in the SFL, the program will not compile. Need to add INDARA keyword to the dispaly file.
    3. Need to define an array that is in the same format as the SFL DS.
    4. Clear or initializ the array DS.
    5. perform a FOR or DO loop and chain each record of the SFL and move to the array DS.
    6. Sort the array.
    7. Perform CLRSFL.
    8. perform a FOR or DO loop and move each element of the array (if not blank or zero) back to the SFL DS. and write to the SFL.

    You see it is 8 steps instead of one step.

    More coding, makes it harder to read the code fo fellow programmers, more prone to errors.

    Multiply it by tens of thousand installed IBM i Systems.

    If all this could be eliminated by adding just a simple SORTSFL operation code. We, progarammers are demanding from user to automate everything, why not automate some of the the programming itself.

  • Guest
    Reply
    |
    May 29, 2017

    well, nothing prevents you from doing that in an array and re-display the subfile

  • Guest
    Reply
    |
    Mar 30, 2017

    Matt_Tyler, SQL order by works only on physical files not on a subfile.

  • Guest
    Reply
    |
    Mar 29, 2017

    There already exists sorting it called SQL order by clause.