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 Jun 30, 2017

%int() and %dec()does not allow blank character string

If I use a character string that only contain spaces or a variable character string with length=0 then %int() and %dec() returns with an escape message RNX0105 - "A character representation of a numeric value is in error.".

I have studied the manual thoroughly and nowhere is required that at least one numeric character is present in the character string.

I would expect that zero is returned.

%float might have the same problem but I haven't tested this situation.


Use Case:

str = *blanks;
nbr = %int( str );

This causes an error but should return zero.

str = ' 0 ';
nbr = %int( str );

This is accepted and nbr is now zero.


Idea priority Medium
  • Guest
    Reply
    |
    Nov 12, 2020

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

    A new value *ALWBLANKNUM is supported for the EXPROPTS Control keyword. When you specify Control keyword EXPROPTS(*ALWBLANKNUM), the value zero will be returned if a blank or empty string is specified for the numeric built-in functions such as %DEC and %INT.

    PTFs for 7.3:
    - SI74559: ILE RPG runtime. Note that you need this PTF on every 7.3 system where you run your programs that use this enhancement.
    - SI74612: TGTRLS(*CURRENT) compiler

    PTFs for 7.4:
    - SI74560: ILE RPG runtime. Note that you need this PTF on every 7.4 system where you run your programs that use this enhancement.
    - SI74613: TGTRLS(*CURRENT) compiler
    - SI74614: TGTRLS(V7R3M0) compiler

    For more details, please see https://ibm.biz/rpgcafe_numeric_bif_enhancements

  • Guest
    Reply
    |
    Oct 22, 2020

    IBM agrees with the request and a solution appears to be desirable and feasible. IBM intends to provide a solution.

    The enhancement is a new value for Control keyword EXPROPTS. If you code EXPROPTS(*ALWBLANKNUM), an empty or blank string for %DEC, %INT etc will return zero.

    See https://ibm.biz/rpgcafe_numeric_bif_enhancements for more information.

  • Guest
    Reply
    |
    Apr 28, 2020

    The CAAC has reviewed this requirement and recommends that IBM view this as a medium priority requirement that should be addressed. This is somewhat of an oddity that should be addressed sooner rather than later.

    Background: The COMMON Americas Advisory Council (CAAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CAAC has a key role in working with IBM i development to help assess the value and impact of individual RFEs on the broader IBM i community, and has therefore reviewed your RFE.

    For more information about CAAC, see www.common.org/caac

    For more details about CAAC's role with RFEs, see http://www.ibmsystemsmag.com/Blogs/i-Can/May-2017/COMMON-Americas-Advisory-Council-%28CAAC%29-and-RFEs/

    Nancy Uthke-Schmucki - CAAC Program Manager

  • Guest
    Reply
    |
    Apr 17, 2020

    This request is still a candidate to be an enhancement for the RPG compiler.

    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.

    If this is implemented, it will probably involve a new H spec keyword, something like EXPROPTS(*ALWBLANKNUM).

  • Guest
    Reply
    |
    Aug 25, 2017

    IBM has received the requirement and is evaluating it. IBM will provide a response after evaluation is complete.

    If this is implemented, it will probably involve a new H spec keyword, something like EXPROPT(*ALWBLANKNUM).

  • Guest
    Reply
    |
    Jul 31, 2017

    This is a serious pain. Should be dealt with high priority.

  • Guest
    Reply
    |
    Jul 19, 2017

    I think a more lax version of both i.e. %num() that would leve out any non digits, signe and decimal points would be better. Level %int and %dec to be strict as they are.

0 MERGED

Enhance %Dec, %Int, and %Float to treat blank fields as zero

Merged
Currently the character to numeric BIFs treat an input of blanks as an error. This is silly and causes unnecessary logic to have to be coded to test the field for blanks before attempting to convert. This means that the BIFs cannot be used within ...
about 6 years ago in IBM i / Languages - RPG 5 Delivered
0 MERGED

Improve %Int/%Dec to handle empty string

Merged
Please improve the %Int/%Dec BIFS so that they no longer cause an RNX0105 on an empty string. An empty string should just return 0 as value. Use Case: Please improve the %Int/%Dec BIFS so that they no longer cause an RNX0105 on an empty string. An...
about 4 years ago in IBM i / Languages - RPG 2 Delivered