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 Under review
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on Sep 19, 2024

Enable options(*exact) for indicators.

I am the developer of RPGUNIT and recently I added procedure assertEqual() to it. This procedure handles all data types, because it uses the OVERLOAD keyword for delegating the call to the procedure that is in charge for the data type.

dcl-pr assertEqual overload(assertEqual_string
                          : assertEqual_numeric
                          : assertEqual_float
                          : assertEqual_date
                          : assertEqual_time
                          : assertEqual_timestamp);
//                           : assertEqual_ind);

 

Too my surprise I had to notice, that the parameter fields (defined as: len(32565) varying(4)) were completely filled with '1' or '0', if I pass one of the figurative constants *ON or *OFF to assertEqual().

My first idea was to add an assertEqual_ind() procedure with options(*exact) to force the compiler to call that procedure if *ON or *OFF is passed.

But that did not work, because the compiler did not like it:

RNF3246 Prototypes ASSERTEQUAL_STRING and ASSERTEQUAL_IND both match the call; first match assumed.

 

The idea is to enhance the compiler so that data type 'ind' is handled like a real data type and not just like a label for data type 'char'. If 'ind' was a real data type, the compiler could distinguish between 'char' and 'ind' and hence allow assertEqual_string() next to assertEqual_ind().

In addition *ON and *OFF should be changed, so that only one character is assigned to a field regardless of its length. These figurative constants are BOOLEAN constants and hence should be handled with a fixed length (1 char) in contrast to the other figurative constants such as *ZERO, *ZEROS, *BLANK and *BLANKS.

Idea priority Low
  • Guest
    Reply
    |
    Sep 19, 2024
    IBM has received your Idea and is evaluating it. IBM will provide a response after evaluation is complete.

    The RPG compiler already allows OPTIONS(*EXACT) for indicators.

    However, it is true that an indicator value also matches a parameter defined as another string type such as VARUCS2, which causes the problem where the compiler says that two prototypes match the overloaded call.

    IBM is investigating whether it is possible to change the compiler so that when there is more than one procedure that match the call for an indicator parameter, the compiler can choose the procedure that has the parameter defined as IND OPTIONS(*EXACT) even if there is another procedure that has the parameter define as a string type.

    For the aspect of your Idea where you request that 'ind' be treated as a separate data type from 'char', that is not possible.

    For the aspect of your Idea where you request that *ON and *OFF should change to only return '1' and '0', that is not possible.

    - IBM Power Systems Development