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 (

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 ( - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal ( - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM. - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Future consideration
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on Aug 20, 2023

add loop DOU_LEAVE (Do Untill Leave)


Currently if I need to loop untill end of file' I would do as follows.

SETLL file1;
DOU %EOF(file1);
    read file1; 
  if %EOF(file1);

exsr SR01;


%EOF appears twice which is not perfect code. 

I could repalce the first line with the following:

DOU 1=2;  // Loop forever untill exit via LEAVE or LEAVESR or RETURN.

Without the comment it is not so clear how the program will exit the loop. Also the compiler does not check how the program will exit the loop.

The new operation code DOU_LEAVE will enter into an endless loop untill any exit from loop opeartion is done (LEAVESR, LEAVE) 

.The compiler will check for the presence of LEAVE or LEAVESR within the loop and not compile if it is missing

Similar to message RNF7023 'The Compiler cannot determine how the program can end'.

Thank You
Avrohom Notik.

Idea priority Low
  • Guest
    Oct 19, 2023
    IBM will use this Idea as input to planning, but no commitment is made or implied. This Idea 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 Idea.

    If this Idea is implemented, it will only affect the DOU operation code.

    - IBM Power Systems Development
  • Guest
    Aug 29, 2023

    Agree with Barbara Morris. Thats perfect. It will work with both DOU and DOW.

  • Guest
    Aug 21, 2023

    I like the idea of having some syntax that says the loop will end due to a LEAVE or LEAVESR opcode, so the compiler can make sure there's a way of ending the loop.

    Instead of a new opcode DOU_LEAVE, I think it would be better to use the existing DOU for this, and add something like DOU *LEAVE.

    - Barbara Morris

  • Guest
    Aug 21, 2023

    How about just calling it "do", then it'd just be a free form version of do. The "dow *on" and "dow 1=1" patterns have been well established for endless loops but an explicit syntax would probably be even clearer.