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 Db2 for i
Created by Guest
Created on Aug 14, 2020

Allow more than 1 level of qualified datastructures in SQLRPGLE

We get more and more embedded SQL code in our RPGLE sources but the compiler still only supports 1 level of qualified data structures. This is such a pain.

See Use case for example. More practical examples are joins where you want to use the external file descripstions in a data structure and pass that to the SQL statement.


Use Case:

In below example the first SQL is OK, second one fails because of nested DS.

**free

dcl-ds ds1 qualified;
fieldA char(634);
fielfB char(686);
end-ds;

dcl-ds ds2a qualified;
fieldA char(634);
end-ds;
dcl-ds ds2b qualified;
fielfB char(686);
end-ds;
dcl-ds ds2 qualified;
sub1 likeds(ds2a);
sub2 likeds(ds2a);
end-ds;

exec sql SELECT * into :ds1
FROM fhopsfp AS A inner join fhopsfpg AS B
ON A.fp_appl_grp_nbr = B.fpg_appl_grp_nbr where A.fp_appl_grp_nbr = 3;

exec sql SELECT * into :ds2
FROM fhopsfp AS A inner join fhopsfpg AS B
ON A.fp_appl_grp_nbr = B.fpg_appl_grp_nbr where A.fp_appl_grp_nb

// SQL0312 30 32 POSITION 32 VARIABLE DS2 NOT DEFINED OR NOT USABLE.
// Reason: A member of the host structure is a structure.

*inlr = *on;


Idea priority High
  • Guest
    Reply
    |
    Oct 10, 2021

    The following RFE has been closed as a duplicate of this RFE:
    http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=151158

  • Guest
    Reply
    |
    Feb 26, 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
    |
    Jan 12, 2021

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

  • Guest
    Reply
    |
    Dec 23, 2020

    I hope this will also include the ability to fully qualify complex data-structures in an SQL predicate.
    Example:
    Select column from table_name where column1 = :ds_name.sub_ds.sub_ds.sub_field

    Another example is in the use of a service program with multiple procedures where the procedures share prototypes of templated complex data-structures.
    The SQL pre-compiler will not be able to distinguish the sub-data-structures if they cannot be fully qualified because of the naming scheme used across the procedures.
    Example:
    dcl-ds data_key_template template;
    key1 char(10);
    key2 char(10);
    key3 char(10);
    end-ds;

    dcl-ds Get_Data qualified;
    data_key likeds(data_key_template);
    p_date date;
    p_user char(10);
    end-ds;

    dcl-ds Update_Data qualified;
    Get_Data likeds(Get_Data);
    new_value char(10);
    end-ds;

    dcl-proc Get_Data;
    dcl-pi *n char(2);
    INPUT likeds(Get_Data) const;
    end-pi;

    EXEC SQL
    SELECT P_DATE, P_USER
    INTO :INPUT.p_date, :INPUT.p_user
    FROM LIB.TABLE
    WHERE KEY1 = :INPUT.data_key.key1
    AND KEY2 = :INPUT.data_key.key2
    AND KEY3 = :INPUT.data_key.key3;

    return '00';
    end-proc;

    dcl-proc Update_Data;
    dcl-pi *n char(2);
    INPUT likeds(Update_Data) const;
    end-pi;

    EXEC SQL
    update LIB.TABLE
    set P_USER = :INPUT.new_value
    WHERE KEY1 = :INPUT.Get_Data.data_key.key1
    AND KEY2 = :INPUT.Get_Data.data_key.key2
    AND KEY3 = :INPUT.Get_Data.data_key.key3;

    return '00';
    end-proc;

  • Guest
    Reply
    |
    Oct 20, 2020

    The CAAC has reviewed this requirement and recommends that IBM view this as a high priority requirement that is important to be addressed. Knowledge Center has info about RPG qualified data structures in the LIKEDS keyword -- see
    https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzasd/rpgrelv7r4post.htm. Due to this extended support, we believe that SQLRPGLE should support this as well.

    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
    |
    Aug 19, 2020

    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 - Db2 for i
    Operating system - IBM i
    Source - Client

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

0 MERGED

Allow nested DS as SQL hostvariable

Merged
When performing a join of two tables the resulting host variable that contains (all) fields of the two tables cannot be defined as... Dcl-DS tFileA ExtName('FILEA') Qualified Alias Template; End-Ds; Dcl-DS tFileB ExtName('FILEB') Qualified Alias T...
over 3 years ago in IBM i / Db2 for i 5 Future consideration