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
Created by Guest
Created on Jan 31, 2018

Checking for Optional Parameters in CLLE

Now that we have %ADDR and the *NULL keyword in CL/ILE, it would be awfully, awfully nice (for cross-language consistency) that since we have %PARMS, %PARMNUM, and the *BLANKS and *ZEROS keywords in RPG/ILE, that we could also have the same in CL/ILE.

There are a couple of other RFE's in this area (one even from me):

https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=102487
https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=103104

However, they don't go far enough for the full functionality I am requesting with this latest RFE.


Use Case:

I can check for optional parameters as follows in RPG/ILE:

if %parms() < %parmnum(OptRun) // if parm not passed
or %addr(OptRun) = *null // or parm was omitted
or OptRun <= *blanks; // or parm is blank
else; // keep default, else
RunOpt = OptRun; // replace default
endif;

I should be able to do exactly the same in CL/ILE -- as follows:

IF COND(%PARMS *LT %PARMNUM(&OPTRUN) +
*OR %ADDR(&OPTRUN) *EQ *NULL +
*OR &OPTRUN *LE *BLANKS) THEN(DO) /* NOT PASSED? */
ENDDO /* OR IS BLANK */
ELSE CMD(DO) /* KEEP DFLT, ELSE */
CHGVAR VAR(&RUNOPT) VALUE(&OPTRUN) /* REPLACE DEFAULT */
ENDDO


Idea priority Medium
  • Guest
    Reply
    |
    May 6, 2020

    Support of *BLANKS and *ZEROS are under consideration but with low priority, since https://jazz07.rchland.ibm.com:24443/jazz/web/projects/IBM%20i%20RFE#action=com.ibm.team.workitem.viewWorkItem&id=22639 103104: Add new function *BLANKS and *ZEROS on CLP is already for the rest part, close this one with delivered.

  • Guest
    Reply
    |
    Dec 20, 2018

    The new %PARMS built-in function for ILE CL compiler by PTF SI66721 for V7R3.
    %PARMS returns the number of parameters that were passed to the program in which %PARMS is used.
    Support of *BLANKS and *ZEROS are under consideration.