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 Db2 for i
Created by Guest
Created on May 11, 2018

SQL Extended Indicators in MAIN Stored Procedure

We have used SQL Extended Indicators in RPG/ILE for years and find them to be very useful -- including saving a lot of lines of code. For the first time, we tried to use the Extended Indicators in an SQL MAIN stored procedure and find that they are not accepted. This request is to ask for SQL Extended Indicator support in SQL MAIN stored procedures.


Use Case:

Instead of being able to simply code an UPDATE statement such as the following -- -in order to get selective update of four of the columns:

Update QTEMP/IMLFADJA
Set BgnYrCst = pBgnYrCst BgnYrCst_Ind
, EndYrCst = pEndYrCst EndYrCst_Ind
, EndQtyHnd = pEndQtyHnd EndQtyHnd_Ind
, EndQtyHld = pEndQtyHld EndQtyHld_Ind
, ChgByUsr = SESSION_USER
, ChgByPgm = 'IMLFADJSP'
Where ImLfAdjTid = AdjTid;

I had to take the time to create more than 40 lines of code in order to work around the fact that extended indicators are not accepted in an SQL MAIN stored procedure. This meant switching to dynamic SQL and using a lot of IF statements to build an SQL statement in a VARCHAR variable that then needed to be prepared and finally executed.


Idea priority High
  • Guest
    Reply
    |
    May 14, 2020

    IBM believes that the request described has been solved and is available with DB PTF Groups IBM i 7.4 SF99704 Level 7 and IBM i 7.3 SF99703 Level 18.

    Extended indicators are now supported in SQL functions, procedures, and triggers.

  • Guest
    Reply
    |
    Aug 20, 2019

    The CAAC has reviewed this requirement and recommends that IBM view this as a high priority requirement that is important to be addressed. This will simplify coding efforts.

    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
    |
    Mar 20, 2019

    An SQL MAIN procedure is one that specifies "Program Type MAIN" in its source definition. So, yes, you could refer to it as a "pure" SQL procedure. I've seen some refer to it as written completely in SPL, too.

  • Guest
    Reply
    |
    Mar 19, 2019

    Please reply to the question asked by CAAC in the Comment below.

  • Guest
    Reply
    |
    Mar 19, 2019

    The CAAC has reviewed this RFE. More information is needed. When you speak of "SQL MAIN", is that the RPG "MAIN" procedure, or a pure SQL procedure?

    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