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 22, 2017

New RPG figurative constant *CLEAR.

The new figurative constant *CLEAR assumes his value by the field type. For example, with a character field the value is *BLANK, with a numeric field the value is *ZERO, with an indicator the value is *OFF and so on. In other words, *CLEAR has the same value given by CLEAR operation code.


Use Case:

DCL-S myFieldChar CHAR(1);
DCL-S myFieldNum INT(10);
DCL-S myFieldDate DATE;

// Now

IF myFieldChar = *BLANK;
...
ENDIF;

IF myFieldNum = *ZERO;
...
ENDIF;

IF myFieldDate = *LOVAL;
...
ENDIF;

// After

IF myFieldChar = *CLEAR;
...
ENDIF;

IF myFieldNum = *CLEAR;
...
ENDIF;

IF myFieldDate = *CLEAR;
...
ENDIF;


Idea priority Low
  • 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
    |
    Nov 6, 2018

    Comparison to *CLEAR would be useful for data structures.

  • Guest
    Reply
    |
    Nov 5, 2018

    Why would you type 6 characters instead of just '' or 0 ?

    In addition I consider a test on = '' or = 0 also more readable.

  • Guest
    Reply
    |
    Mar 31, 2017

    I find it is a good idea and have been missing it my self.
    But I would call it *DEFAULT instead of *CLEAR.

    Perhaps we can have both... :-)

  • Guest
    Reply
    |
    Mar 30, 2017

    @SRinStL314, if *CLEAR were to be supported for assignment, it would behave the same way as the CLEAR opcode. With data structures, each subfield would be cleared according to its data type. For comparison, the value represented by *CLEAR would be the same as the value of the data structure if it were cleared.

  • Guest
    Reply
    |
    Mar 29, 2017

    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 - Client

    For recording keeping, the previous attributes were:
    Brand - Servers and Systems Software
    Product family - Power Systems
    Product - IBM i
    Component - Application Development
    Operating system - IBM i
    Source - Client

  • Guest
    Reply
    |
    Mar 27, 2017

    Here is a similar request about the reset value:
    https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=86077

  • Guest
    Reply
    |
    Mar 23, 2017

    This would also need to take into account data structures as a whole as well as data structure subfields. In the event of a mixed field type data structure, are you expecting the subfields to be cleared by type still?

  • Guest
    Reply
    |
    Mar 23, 2017

    Hello,
    i think is it a good idea.
    But in RPG we have RESET and CLEAR.
    Could you add there *reset to check for "RESET-Value"?

  • Guest
    Reply
    |
    Mar 23, 2017

    Maybe to add also the figurative constant *INZ - it will be true if the variable has the same value as it is after initialization.

    if &Var1 = *INZ;