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
Created by Guest
Created on Mar 29, 2021

Provide a PARSE_CL_STMT SQL UDTF that returns parms and values

It would be great to have a way to check CL command options similar to how we do today with PARSE_STATEMENT for SQL statements.
The ideal candidate would return the parameters (kwd names) and the value the user passed to those parameter in a table resultSet.


Use Case:

processing CL today we rely on QCMDCHK to syntax check the CL Command but it would be more functional to have a way to parse that CL statement and return the parameters and the value specified.
For example:
clCmd = 'ADDPFM QGPL/TESTFILE MBR(PICKLES) SRCTYPE(SQL)'

select * from table(qssy2.PARSE_CL_STMT( :clCmd );

Which would return:
CMD PARM ORDINAL ELEMS VALUE
ADDPFM FILE 1 1 QGPL/TESTFILE
ADDPFM MBR 1 1 PICKLES
ADDPFM SRCTYPE 1 1 SQL

For parameters with MAX(>1) the ORDINAL would represent each value passed in to the same parameter. While the ELEMS would identify the element value for that ORDINAL of the parameter.
For example, a parameter of the following:
MYCMD OBJ((QGPL/OBJ1 *FILE) (QGPL/OBJ2 *PGM))
would be returned:

mycmd OBJ 1 1 QGPL/OBJ1
mycmd OBJ 1 2 *FILE
mycmd OBJ 2 1 QGPL/OBJ2
mycmd OBJ 2 2 *PGM


Idea priority Medium
  • Guest
    Reply
    |
    Nov 30, 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.

  • Guest
    Reply
    |
    Apr 8, 2021

    Thanks for the suggestion, however I'm asking from something entirely different.
    I'm looking for an API or SQL UDTF that would accept as input, a CL Command string and return a list of the parameters and their values, parsed and separated into variables (subfields in a struct for an API, or columns in a table for SQL).

    Simplest of examples would be:

    CALL QGYOLPRS( rtnStruct, sizeof(rtnStruc), 'CMDI0100', 'ADDLIBLE LIB(QGPL *LAST)');

    Then we'd need to do the Open List API that would be created and associated with the above Open List API, to read each parameter and value.

    CALL QGYGTLE(.... );
    which would return an entry with a handful of field values:

    1) CL Command Name
    2) Parameter Keyword Name
    3) Number of occurrences of the parameter (e.g., if max(300) is specified on the parm def, this could return 0 to 300. Typically this would be set to 1 when MAX(1) is specified.
    4) This parameter values occurrence number.
    5) Number of parameter elements - The number of parameter elements for this occurance specified
    6) This Value's element number
    7) The definition of the parameter
    7.1) The datatype
    7.2) The defined length
    8) The data specified for the Parameter value

    The above example, would return two entries or records. The below is just for example purposes, and the data is shown as comma delimited values instead of a struct or SQL Table.

    ADDLIBLE, LIB, 1, 1, 2,1,C,10, QGPL
    ADDLIBLE, LIB, 1, 1, 2,2,C,8, *LAST

    So that's what I'm looking for. Thanks.

  • Guest
    Reply
    |
    Apr 8, 2021

    Is the solution described below satisfy your need?

  • Guest
    Reply
    |
    Apr 7, 2021

    Please check the function of Command Analyzer Retrieve Exit Program at exit point QIBM_QCA_RTV_COMMAND, https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/apis/xcartv.htm. The rebuild command string will be passed to this exit program as input parameter, and then this command string can be used to do security and integrity checking.
    Here is another article about this feature: https://www.ibm.com/support/pages/example-program-exit-point-qibmqcartvcommand
    https://www.securemyi.com/articles/artcmdexit2.htm

  • Guest
    Reply
    |
    Apr 6, 2021

    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 - CL (Control Language)
    Operating system - IBM i
    Source - None

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