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 May 3, 2017

RPG LE Level Break Subroutines for Free-format

We need RPG LE level break subroutines for use in free-format so that fixed-format C-specs do not need to be coded at all for level break processing. Currently I not only have to code a fixed-format F-spec and I-spec in order for the RPG Cycle to control report level breaks, but I also have to code a fixed-format C-spec for each level L1 ... L9 plus LR. If the RPG compiler supported special subroutines names to indicate all of these levels then it would make the calculation specs just that much cleaner.


Use Case:

For example, instead of having to code the following fixed-format C-specs to execute my own subroutines for processing level breaks:

CL1 exsr L1TOTAL
CL2 exsr L2TOTAL
CL3 exsr L3TOTAL
CLR exsr LRTOTAL

if the RPG compiler would support special subroutine names such as the following, then the fixed-format C-specs could be eliminated while still providing support for subroutines to process the equivalent level breaks.

begsr *L1SR;
...
endsr;

begsr *L2SR;
...
endsr;

begsr *L3SR;
...
endsr;

begsr *LRSR;
...
endsr;


Idea priority High
  • Guest
    Reply
    |
    Nov 22, 2017

    To do it the free format way, it would be needed to have a File-read-loop option.

    File-read-loop Myfile [*ASC/*DESC)

    file-read-loop-Start (key1:key2:key3...)
    file-read-loop-End (key1:key2:key3...)
    file-read-loop-L2((Fld1:Fld2):srmyfile_d_l2:srmyfile_T_L2))
    file-read-loop-L1((Fld3):*N:srmyfile_d_l1))
    End-File-read-loop

  • Guest
    Reply
    |
    May 5, 2017

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

    It is not really necessary to code a separate fixed-form calculation statement for each level. It should be sufficient to code a single fixed form statement with an L0 level indicator. Then, following the L0 statement, ordinary IF statements can be used to check the *INLx indicators. The fixed-form calculation statement could be put into a copy file called something like TOTALCALCS and copied into any module needing it.

  • Guest
    Reply
    |
    May 4, 2017

    I wish there was a way to vote minus 1 on this. RPG has moved to fully free format. But the cycle cannot be used without using old-style fixed format specs anyway - so why waste money tweaking level breaks into the calcs?

    Not a good use of IBM's limited resources in my opinion.

  • Guest
    Reply
    |
    May 4, 2017

    To mihael_schmidt: I can code date routines myself, and I used to do it very perfect before the intrduction of the RPG built in date functions and operations. Do You think it was a mistake by IBM that they introduced date functions in RPG?

    The same is true with advanced structured code, like LEAVE, LEAVESR. Why not use GOTO statement. Because GOTO is errorprone (if done by slappy programmers). The same is true with user define level breaks!

  • Guest
    Reply
    |
    May 4, 2017

    As you have said yourself, you can code level breaks yourself. The IBM team should focus on things that the normal user can not do.

  • Guest
    Reply
    |
    May 4, 2017

    With all the advanced features of RPG, user written level breaks have so many ways to code the and are more error prone. Therefore, especially whe thre needs to be more than one break + detail and total levle break routines.

    If IBM i decides to continue developing level breaks, it needs a litle improvement::

    Add an SQL statement to the primary file that may be used for the selection criteria: SQL-WHERE( CUSTNUM = :P1_CUSTNUM).

  • Guest
    Reply
    |
    May 4, 2017

    Need 2 subroutine names for each level: *LDTL and *L1TTL.

  • Guest
    Reply
    |
    May 3, 2017

    Um... the RPG cycle (level breaks)? That would be a disappointing feature in my opinion.