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 Delivered
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on May 26, 2017

Logical expressions resulting to *On/*Off

The result of a logical expression should evaluate to *On (True) or *Off (False)


Use Case:

DoW *On; // Infinite loop
DoW *Off; // Bypass the loop. can be useful for testing
DoU *Off; // Infinite loop
DoU *On;
If *On;
If *Off;
Etc.

Now, compiler gives error below, but an indicator expression was specified:
*RNF7423 30 1 A relational expression or indicator is expected for logical
operations.


Idea priority Medium
  • Guest
    Reply
    |
    May 15, 2020

    IBM believes that the request described has been solved and is available with PTFs for 7.3 and 7.4.

    7.3 PTF: SI73190
    7.4 PTF: SI73192

  • Guest
    Reply
    |
    Apr 13, 2020

    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.

  • Guest
    Reply
    |
    May 31, 2017

    Barbara, wish you could reconsider implementing also *TRUE and *FALSE figurative constants,
    which would improve code readability by much

    thanks

  • Guest
    Reply
    |
    May 30, 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
    |
    May 30, 2017

    I don't think it's a bug, because *ON and *OFF aren't documented as indicators. They're documented like the other figurative constants (as "all ones" or "all zeros").

    But it seems reasonable to me that *ON or *OFF should be allowed as a logical operand.

    I don't think it's necessary to add *TRUE and *FALSE.

  • Guest
    Reply
    |
    May 29, 2017

    oh, then it would be nice if *TRUE and *FALSE would be defined as Figurative Constants (as it should, right?)

    defining them as named constants (C) in D specs does not work for me in 7.1, only as S var INZ(*On)

  • Guest
    Reply
    |
    May 29, 2017

    Jon, I just tested that also (defining true as N Inz to *On...) and yes it compiles

    like you said: looks more like a bug then a missing feature

    thanks

  • Guest
    Reply
    |
    May 28, 2017

    DoW *On; DoW 1=1; // Infinite loop
    DoW *Off; DoW 1=2; // Bypass the loop. can be useful for testing
    DoU *Off; DoU 1=2; // Infinite loop
    DoU *On; DoU 1=1;
    If *On; If 1=1;
    If *Off; If 1=2;

  • Guest
    Reply
    |
    May 27, 2017

    Can't edit my comment so ...

    I see now that *On/*Off do not work and I agree that does not seem logical since they are clearly identified as indicators. But this seems like a reportable compiler bug rather than a missing feature.

  • Guest
    Reply
    |
    May 27, 2017

    This already works - I just tested it and all of these are fine:
    if true;
    endif;
    if false;
    endif;
    if '1';
    endif;

    Even if it didn't work, I would hate to see any further addition of changes to support the antiquated idea of testing for character 1 and 0 instead if true/false. IN the above examples true and false were defined as named constants.