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 Future consideration
Workspace IBM i
Categories Languages - RPG
Created by Guest
Created on Dec 9, 2020

Add Case Conversion to RPG Subprocedure Parameters

Add support to automatically convert Subprocedure Parameters to Upper or Lower case using OPTION(*UPPER) or OPTION(*LOWER) keywords on the parameter definition. Obviously, this would be for CHAR, VARCHAR parameters that are also CONST or VALUE. It should use the QlgConvertCase API for CCSID-safe conversion (or equivalent).


Use Case:

We write subprocedures that accept parameters with specific values, such as "*PRINT" but in the body of the proc, we have to handle *PRINT, *print, *Print and even *PriNt which means we have to first convert the parameter using a work field by using either SQL or if not an SQLRPGLE program, then QlgConvertCase API. Lots of unrelated code just to test a parameter value.


Idea priority High
  • Guest
    Reply
    |
    Mar 10, 2021

    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
    |
    Mar 4, 2021

    Hi Barbara,
    Yes, you are correct. My procedure only handles data without any special characters. In our case, that has been enough but, if we had to worry about any special characters then, I would write a procedure around the QlgConvertCase API and go from there. That's my approach to this particular problem.

  • Guest
    Reply
    |
    Mar 4, 2021

    Marina, your procedure will work for data, but it would not handle a name like "Bergström". That would get uppercased as "BERGSTRöM" if you only handle A-Z.

    The requested option to handle this with the OPTIONS keyword would handle all the characters for the LANGID of the job, and the name would be uppercased as "BERGSTRÖM".

    But your point is well taken, since you could easily call the QlgConvertCase API from your procedure, and it would handle all the characters in the LANGID of your job.

  • Guest
    Reply
    |
    Mar 3, 2021

    I understand maybe not wanting to have to manipulate the case of the input parameters but, this is easily handled with creating procedures in a service program and then just call them as soon as you enter your procedure.

    For example, I have my ToUpperCase and toLowerCase procedures that we use all of the time.

    dcl-c Uppercase const('ABCDEFGHIJKLMNOPQRSTUVWXYZ');
    dcl-c Lowercase const('abcdefghijklmnopqrstuvwxyz');

    dcl-proc toUpperCase export;

    dcl-pi *n varchar(64000);
    data varchar(64000) value;
    end-pi;

    dcl-s newData varchar(64000);

    newData = %xlate(Lowercase:Uppercase:data);

    return newData;

    end-proc;

    dcl-proc toLowerCase export;

    dcl-pi *n varchar(64000);
    data varchar(64000) value;
    end-pi;

    dcl-s newData varchar(64000);

    newData = %xlate(Uppercase:Lowercase:data);

    return newData;

    end-proc;

    Then just call them as you need them

    toLowerCase( input); or toUpperCase( input )

  • Guest
    Reply
    |
    Jan 18, 2021

    The CEAC has reviewed this requirement and recommends that IBM view this as a MEDIUM priority requirement that should be addressed.

    Background: The COMMON Europe Advisory Council (CEAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CEAC has a crucial 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.

    To find out how CEAC help to shape the future of IBM i, see CEAC @ ibm.biz/BdYSYj and the article "The Five Hottest IBM i RFEs Of The Quarter" at ibm.biz/BdYSZT

    Therese Eaton – CEAC Program Manager, IBM

  • Guest
    Reply
    |
    Dec 28, 2020

    Thanks Barbara. Glad to have comments from people who know, vs people who apparently just want to make their knowledge of the obvious known to others.

  • Guest
    Reply
    |
    Dec 18, 2020

    KristerK, RFE is related to 92793, but the two RFEs are different. RFE 92793 is about new built-in functions %UPPER and %LOWER. This RFE is about an option for prototyped parameters to automatically perform upper or lower casing for the parameter.

  • Guest
    Reply
    |
    Dec 17, 2020

    Isn´t this duplicate of this request?
    http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=92793

  • Guest
    Reply
    |
    Dec 11, 2020

    Or something like this

    if %xlate('xml' : 'XML': extension ) = '.XML';

    It handles the situation where extension contains the strings .XML, .xml, .XmL etc.

  • Guest
    Reply
    |
    Dec 10, 2020

    Why do you need a workfield for this ?

    Just write a wrapper (which I did day one procedures became available) around QlgConvertCase so you can code;

    If Uppercase(myParm) = '*PRINT';