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 Jun 10, 2020

Free form KLIST to allow same field in multiple KLIST

Allow Free Form version of KLIST with the same field in multiple key lists. For example displaying customer invoices I want to have a key list for Customer and Invoice # and another for Customer and Order Date and use the same field for customer in both lists


Use Case:

A subfile program displaying invoices for a customer that allows you to sort by either Invoice # or Order date. If fixed format I would have
c wkPsn1 klist
c kfld Cust
c kfld Invc#

c wkPsn2 klist
c kfld Cust
c kfld DtOrder


Idea priority Medium
  • Guest
    Reply
    |
    Dec 4, 2020

    James Elser, if the concern is defining the key list in one place, have you considered a %KDS?

  • Guest
    Reply
    |
    Aug 19, 2020

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

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

  • Guest
    Reply
    |
    Jul 10, 2020

    Thanks for the clarification.

  • Guest
    Reply
    |
    Jul 10, 2020

    It does work to use the chain(key1: key2) File but if I want to change what keys I am using I have to change everyplace this is used instead of just changing the key list in one place.

  • Guest
    Reply
    |
    Jun 18, 2020

    A free-form key list already exists.

    For example
    chain (Cust : Invc#) fmt1;
    chain (Cust : DtOrder) fmt2;

    If this does not satisfy the requirement, please give more information about what you are unable to do.

  • Guest
    Reply
    |
    Jun 17, 2020

    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 - Programming Languages
    Product - Developer for Power Systems
    Component - RPG/COBOL Development Tools
    Operating system - IBM i
    Source - None

  • Guest
    Reply
    |
    Jun 17, 2020

    I can't image IBM investing in RPG 3 or even RPG IV anymore; especially when there is a free form solution or two as Barbara and Mark pointed out.
    Why don't you read these resources to learn more about how to do what you want to do. Note how long ago they were written.
    https://www.mcpressonline.com/programming/rpg/techtip-no-klist-what-do-i-do-now
    https://www.rpgpgm.com/2015/01/how-to-replace-key-lists.html
    https://www.tug.ca/tec/Sessions/Handouts/PDF/23A-RPGTipsAndTechniques.key.pdf
    with the last one look at slide 24.
    Please don't take this terse post as a rebuke, and please keep making suggestions that will improve programming.

  • Guest
    Reply
    |
    Jun 15, 2020

    And if you want to use a data structure, you would do it like this:

    dcl-ds key1 LikeRec(: *key);
    dcl-ds key2 LikeRec(: *key);

    ...

    chain key1 Fmt1;
    chain key2 Fmt2;

  • Guest
    Reply
    |
    Jun 11, 2020

    I don't think this RFE would be an effective use of development resources, given the existing flexibility that the free-format CHAIN affords. As for sorting subfile columns in different sequences, this might be better achieved using embedded (dynamic) SQL.

  • Guest
    Reply
    |
    Jun 11, 2020

    It is already possible to specify a list of keys in free-form using the same key in different lists.

    CHAIN (Cust : Invc#) Fmt1;

    CHAIN (Cust : DtOrder) Fmt2;