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 Not under consideration
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on Mar 9, 2022

Provide a QCMDEXC-Likc Stored Proc that uses CONTAINS SQL

Provide an NEW SQL Stored Procedure for QCMDEXC or QCAPCMD that is set to CONTAINS SQL instead of MODIFIEDS SQL DATA.


Use Case:

When creating user-written SQL Functions that only contain SQL statements or perhaps READS SQL DATA, the use of QCMDEXC procedure causes those user-written procedures and functions to be MODIFIES SQL DATA because the IBM-supplied QCMDEXC Stored Procedure is set to MODIFIES SQL DATA.
This means that EVERY other User-written function we create that then calls our new UDF or Proc must also be MODIFIES SQL DATA. In normal shops.


Idea priority High
  • Guest
    Reply
    |
    Apr 6, 2022
    IBM does not intend to provide a solution to this request, so it is being closed. The IBM i database team has many other higher priority items we want to deliver, so this one will not be pursued at this time.

    The set of clients who recognize the difference between the MODIFIES SQL DATA and CONTAINS SQL data classifications, and who could correctly select which version of a QCMDEXC procedure to use, is very small. The development team believes the error that would result from using the CONTAINS SQL version with a CL command that uses SQL would be confusing to most users. This is an additional reason we are not accepting this request.


    Db2 for IBM i team
    IBM Power Systems Development
  • Guest
    Reply
    |
    Mar 15, 2022

    The CAAC has reviewed this requirement and recommends that IBM not implement this request. This is not likely a common use case among the IBM i community, and the submitter has written his own solution.

    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

    Nancy Uthke-Schmucki - CAAC Program Manager

  • Guest
    Reply
    |
    Mar 11, 2022

    Bob,
    The qcmdexc scalar function has multiple uses. You dont necessarily need to use it to run another UDF or UDTF. I have used it to run CL commands and executed it from CL, or blended CL and SQL together.
    Maybe it would fit your use case?
    https://www.ibm.com/docs/en/i/7.4?topic=services-qcmdexc-scalar-function

  • Guest
    Reply
    |
    Mar 9, 2022

    jp lamontre, I do not. I use it IN a UDF/UDTF I never need it to RUN another UDF/UDTF.

  • Guest
    Reply
    |
    Mar 9, 2022

    Hi Bob,
    why/when do you need qsys2.qcmdexc to run a udf ?

  • Guest
    Reply
    |
    Mar 9, 2022

    Just as preemptive note: I have written my own QCAPCMD SQL Procedure with CONTAINS SQL for just this purpose and it works fine. I also created a C stub that can be INCLUDE'd in SQL functions that uses a host variable to run a CL command which only uses whatever READS/CONTAINS/MODIFIES setting the new function uses. This is actually th best solution. Perhaps an inline QCMDEXC "macro" of sorts.